summaryrefslogtreecommitdiff
path: root/utils/FileCheck/FileCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/FileCheck/FileCheck.cpp')
-rw-r--r--utils/FileCheck/FileCheck.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp
index c9eb8a650c..d5f760246d 100644
--- a/utils/FileCheck/FileCheck.cpp
+++ b/utils/FileCheck/FileCheck.cpp
@@ -794,12 +794,12 @@ static StringRef FindFirstCandidateMatch(StringRef &Buffer,
continue;
Check::CheckType Ty = FindCheckType(Rest, Prefix);
- if (Ty == Check::CheckNone)
- continue;
FirstLoc = PrefixLoc;
FirstTy = Ty;
- FirstPrefix = Prefix;
+ // We've found the first matching check prefix. If it is invalid, we should
+ // continue the search after it.
+ FirstPrefix = (Ty == Check::CheckNone) ? "" : Prefix;
}
if (FirstPrefix.empty()) {