add support for -Wextra and -W
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69236 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/Warnings.cpp b/tools/clang-cc/Warnings.cpp
index af50ce4..9cd1cc3 100644
--- a/tools/clang-cc/Warnings.cpp
+++ b/tools/clang-cc/Warnings.cpp
@@ -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");