r281412 - Warning flag updates:

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 13 15:51:09 PDT 2016


Author: rsmith
Date: Tue Sep 13 17:51:09 2016
New Revision: 281412

URL: http://llvm.org/viewvc/llvm-project?rev=281412&view=rev
Log:
Warning flag updates:
-Wdiv-by-zero may as well be an alias for -Wdivision-by-zero rather than a GCC-compatibility no-op.
-Wno-shadow should disable -Wshadow-ivar.
-Weffc++ may as well enable -Wnon-virtual-dtor like it does in GCC.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticGroups.td

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=281412&r1=281411&r2=281412&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Tue Sep 13 17:51:09 2016
@@ -114,7 +114,8 @@ def Deprecated : DiagGroup<"deprecated",
 def LibLTO : DiagGroup<"liblto">;
 def : DiagGroup<"disabled-optimization">;
 def : DiagGroup<"discard-qual">;
-def : DiagGroup<"div-by-zero">;
+def DivZero : DiagGroup<"division-by-zero">;
+def : DiagGroup<"div-by-zero", [DivZero]>;
 
 def DocumentationHTML : DiagGroup<"documentation-html">;
 def DocumentationUnknownCommand : DiagGroup<"documentation-unknown-command">;
@@ -201,8 +202,6 @@ def CXX14CompatPedantic : DiagGroup<"c++
 def CXX1zCompat : DiagGroup<"c++1z-compat", [DeprecatedRegister,
                                              DeprecatedIncrementBool]>;
 
-def : DiagGroup<"effc++">;
-def DivZero : DiagGroup<"division-by-zero">;
 def ExitTimeDestructors : DiagGroup<"exit-time-destructors">;
 def FlexibleArrayExtensions : DiagGroup<"flexible-array-extensions">;
 def FourByteMultiChar : DiagGroup<"four-char-constants">;
@@ -290,6 +289,7 @@ def NonPODVarargs : DiagGroup<"non-pod-v
 def ClassVarargs : DiagGroup<"class-varargs", [NonPODVarargs]>;
 def : DiagGroup<"nonportable-cfstrings">;
 def NonVirtualDtor : DiagGroup<"non-virtual-dtor">;
+def : DiagGroup<"effc++", [NonVirtualDtor]>;
 def OveralignedType : DiagGroup<"over-aligned">;
 def OldStyleCast : DiagGroup<"old-style-cast">;
 def : DiagGroup<"old-style-definition">;
@@ -348,10 +348,12 @@ def MissingMethodReturnType : DiagGroup<
 def ShadowFieldInConstructorModified : DiagGroup<"shadow-field-in-constructor-modified">;
 def ShadowFieldInConstructor : DiagGroup<"shadow-field-in-constructor",
                                          [ShadowFieldInConstructorModified]>;
+def ShadowIvar : DiagGroup<"shadow-ivar">;
 
 // -Wshadow-all is a catch-all for all shadowing. -Wshadow is just the
 // shadowing that we think is unsafe.
-def Shadow : DiagGroup<"shadow", [ShadowFieldInConstructorModified]>;
+def Shadow : DiagGroup<"shadow", [ShadowFieldInConstructorModified,
+                                  ShadowIvar]>;
 def ShadowAll : DiagGroup<"shadow-all", [Shadow, ShadowFieldInConstructor]>;
 
 def Shorten64To32 : DiagGroup<"shorten-64-to-32">;
@@ -880,4 +882,4 @@ def UnknownArgument : DiagGroup<"unknown
 
 // A warning group for warnings about code that clang accepts when
 // compiling OpenCL C/C++ but which is not compatible with the SPIR spec.
-def SpirCompat : DiagGroup<"spir-compat">;
\ No newline at end of file
+def SpirCompat : DiagGroup<"spir-compat">;




More information about the cfe-commits mailing list