]> granicus.if.org Git - clang/commitdiff
Add compatibility alias for -Wno-#warnings
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 1 Jun 2017 19:08:34 +0000 (19:08 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 1 Jun 2017 19:08:34 +0000 (19:08 +0000)
GCC uses -Wno-cpp for this, so seems reasonable to add an alias to
match.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304456 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td
test/Misc/diag-mapping2.c

index e1a41584023c4c96e93aeae8364eb18113e0bd54..cf404768472f24977de293d2757190c4b6bdae57 100644 (file)
@@ -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
index 672d0548ad827b2ae44ad8be21124fd8f0f3a386..c3afea94b3701ca1bcd4c0e6725891df953c7ceb 100644 (file)
@@ -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"