Fix a bug that caused opt and other tools to silently ignore
invalid command-line options.
llvm-svn: 47523
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 4fe1aa1..4868752 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -127,7 +127,7 @@
// Remember information about positional options.
if (O->getFormattingFlag() == cl::Positional)
PositionalOpts.push_back(O);
- else if (O->getMiscFlags() && cl::Sink) // Remember sink options
+ else if (O->getMiscFlags() & cl::Sink) // Remember sink options
SinkOpts.push_back(O);
else if (O->getNumOccurrencesFlag() == cl::ConsumeAfter) {
if (CAOpt)