]> granicus.if.org Git - clang/commitdiff
Fixup to the relaxed diagnostic verification option r146633.
authorAnna Zaks <ganna@apple.com>
Fri, 16 Dec 2011 18:28:45 +0000 (18:28 +0000)
committerAnna Zaks <ganna@apple.com>
Fri, 16 Dec 2011 18:28:45 +0000 (18:28 +0000)
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

lib/Frontend/VerifyDiagnosticConsumer.cpp

index 1676a44c46fe29c6969c94a5c3bb0cf9baee1ded..96c990c54f25a04b52df7e6512c0dc07e94d6bfb 100644 (file)
@@ -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.