]> granicus.if.org Git - clang/commitdiff
add support for -Wextra and -W
authorChris Lattner <sabre@nondot.org>
Wed, 15 Apr 2009 22:38:06 +0000 (22:38 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 15 Apr 2009 22:38:06 +0000 (22:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69236 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Diagnostic.td
tools/clang-cc/Warnings.cpp

index e842c5330d9ec315a783f3badc29b33995643fc4..0328fbcfc90bc556b4b58569e8cbda578e893a22 100644 (file)
@@ -34,6 +34,12 @@ class InGroup<DiagGroup G> { DiagGroup Group = G; }
 def ImplicitFunctionDeclare : DiagGroup<"implicit-function-declaration">;
 def Trigraphs : DiagGroup<"trigraphs">;
 
+// Empty DiagGroups: these are recognized by clang but ignored.
+def : DiagGroup<"extra">;
+def : DiagGroup<"">;  // -W
+
+
+
 
 
 
index af50ce4648b4191f93a4da7010d07d74c5089761..9cd1cc3c821e9690fda2f093e05cb14ab834d79b 100644 (file)
@@ -37,7 +37,7 @@ using namespace clang;
 // driver has stripped off -Wa,foo etc.  The driver has also translated -W to
 // -Wextra, so we don't need to worry about it.
 static llvm::cl::list<std::string>
-OptWarnings("W", llvm::cl::Prefix);
+OptWarnings("W", llvm::cl::Prefix, llvm::cl::ValueOptional);
 
 static llvm::cl::opt<bool> OptPedantic("pedantic");
 static llvm::cl::opt<bool> OptPedanticErrors("pedantic-errors");