forked from OSchip/llvm-project
[SemaCXX] add -Woverride-init alias to -Winitializer-overrides
Summary: https://bugs.llvm.org/show_bug.cgi?id=40251 https://github.com/ClangBuiltLinux/linux/issues/307 Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits, nathanchance, srhines Differential Revision: https://reviews.llvm.org/D56522 llvm-svn: 350877
This commit is contained in:
parent
5ea5231bec
commit
2383aad540
|
@ -7885,6 +7885,10 @@ This diagnostic is enabled by default.
|
|||
| |+---------------------+|
|
||||
+-----------------------------------------------------------------------------------------------+-----------------------+
|
||||
|
||||
-Woverride-init
|
||||
--------------
|
||||
Synonym for `-Winitializer-overrides`_.
|
||||
|
||||
|
||||
-Woverride-module
|
||||
-----------------
|
||||
|
|
|
@ -365,6 +365,8 @@ def NullArithmetic : DiagGroup<"null-arithmetic">;
|
|||
def NullCharacter : DiagGroup<"null-character">;
|
||||
def NullDereference : DiagGroup<"null-dereference">;
|
||||
def InitializerOverrides : DiagGroup<"initializer-overrides">;
|
||||
// For compatibility with GCC; -Woverride-init = -Winitializer-overrides
|
||||
def : DiagGroup<"override-init", [InitializerOverrides]>;
|
||||
def NonNull : DiagGroup<"nonnull">;
|
||||
def NonPODVarargs : DiagGroup<"non-pod-varargs">;
|
||||
def ClassVarargs : DiagGroup<"class-varargs", [NonPODVarargs]>;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Winitializer-overrides %s
|
||||
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Woverride-init %s
|
||||
|
||||
template <typename T> struct Foo {
|
||||
struct SubFoo {
|
||||
|
|
Loading…
Reference in New Issue