[cfe-commits] r69236 - in /cfe/trunk: include/clang/Basic/Diagnostic.td tools/clang-cc/Warnings.cpp

Chris Lattner sabre at nondot.org
Wed Apr 15 15:38:06 PDT 2009


Author: lattner
Date: Wed Apr 15 17:38:06 2009
New Revision: 69236

URL: http://llvm.org/viewvc/llvm-project?rev=69236&view=rev
Log:
add support for -Wextra and -W


Modified:
    cfe/trunk/include/clang/Basic/Diagnostic.td
    cfe/trunk/tools/clang-cc/Warnings.cpp

Modified: cfe/trunk/include/clang/Basic/Diagnostic.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.td?rev=69236&r1=69235&r2=69236&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.td (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.td Wed Apr 15 17:38:06 2009
@@ -34,6 +34,12 @@
 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
+
+
+
 
 
 

Modified: cfe/trunk/tools/clang-cc/Warnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/Warnings.cpp?rev=69236&r1=69235&r2=69236&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/Warnings.cpp (original)
+++ cfe/trunk/tools/clang-cc/Warnings.cpp Wed Apr 15 17:38:06 2009
@@ -37,7 +37,7 @@
 // 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");





More information about the cfe-commits mailing list