r304456 - Add compatibility alias for -Wno-#warnings

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 1 12:08:35 PDT 2017


Author: dblaikie
Date: Thu Jun  1 14:08:34 2017
New Revision: 304456

URL: http://llvm.org/viewvc/llvm-project?rev=304456&view=rev
Log:
Add compatibility alias for -Wno-#warnings

GCC uses -Wno-cpp for this, so seems reasonable to add an alias to
match.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticGroups.td
    cfe/trunk/test/Misc/diag-mapping2.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=304456&r1=304455&r2=304456&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu Jun  1 14:08:34 2017
@@ -733,6 +733,7 @@ def Pedantic : DiagGroup<"pedantic">;
 // Aliases.
 def : DiagGroup<"", [Extra]>;                   // -W = -Wextra
 def : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wextra-tokens
+def : DiagGroup<"cpp", [PoundWarning]>;         // -Wcpp = -W#warnings
 def : DiagGroup<"comments", [Comment]>;         // -Wcomments = -Wcomment
 def : DiagGroup<"conversion-null",
                 [NullConversion]>; // -Wconversion-null = -Wnull-conversion

Modified: cfe/trunk/test/Misc/diag-mapping2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/diag-mapping2.c?rev=304456&r1=304455&r2=304456&view=diff
==============================================================================
--- cfe/trunk/test/Misc/diag-mapping2.c (original)
+++ cfe/trunk/test/Misc/diag-mapping2.c Thu Jun  1 14:08:34 2017
@@ -4,6 +4,7 @@
 // This should not emit anything.
 // RUN: %clang_cc1 %s -w 2>&1 | not grep diagnostic
 // RUN: %clang_cc1 %s -Wno-#warnings 2>&1 | not grep diagnostic
+// RUN: %clang_cc1 %s -Wno-cpp 2>&1 | not grep diagnostic
 
 // -Werror can map all warnings to error.
 // RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error: foo"




More information about the cfe-commits mailing list