add support for -Wextra and -W

llvm-svn: 69236
This commit is contained in:
Chris Lattner 2009-04-15 22:38:06 +00:00
parent 4816a3488f
commit 7836eefefc
2 changed files with 7 additions and 1 deletions

View 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

View 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");