diff options
author | Anna Zaks <ganna@apple.com> | 2011-12-16 18:28:45 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-12-16 18:28:45 +0000 |
commit | 0e818a412f337baa35d1d7677c64259610df0c2e (patch) | |
tree | a241907600362dcea6615c7eea84c52c197ba4c9 | |
parent | b29b92ae0b3bcbc6fc72e9283a6ce6ca84564a91 (diff) |
Fixup to the relaxed diagnostic verification option r146633.
We should exit when matching the '+' even if nothing was found to
prevent searching for all UNIT_MAX items.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146747 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Frontend/VerifyDiagnosticConsumer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Frontend/VerifyDiagnosticConsumer.cpp b/lib/Frontend/VerifyDiagnosticConsumer.cpp index 1676a44c46..96c990c54f 100644 --- a/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/lib/Frontend/VerifyDiagnosticConsumer.cpp @@ -443,8 +443,10 @@ static unsigned CheckLists(DiagnosticsEngine &Diags, SourceManager &SourceMgr, break; } if (II == IE) { - if (D.Count == D.OneOrMoreCount && FoundOnce) { - // We are only interested in at least one match and we found one. + if (D.Count == D.OneOrMoreCount) { + if (!FoundOnce) + LeftOnly.push_back(*I); + // We are only interested in at least one match, so exit the loop. break; } // Not found. |