aboutsummaryrefslogtreecommitdiffstats
path: root/utils/FileCheck
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2013-08-02 11:32:50 +0000
committerTim Northover <tnorthover@apple.com>2013-08-02 11:32:50 +0000
commite57343b6365df5b7318c5076f917ad40cf621555 (patch)
tree16f10dfaedfd00d5e7d1217ba2895118f5d4df6b /utils/FileCheck
parent1cd2ed8fdf7547bff3aaedccaac741b8a1d416a3 (diff)
downloadexternal_llvm-e57343b6365df5b7318c5076f917ad40cf621555.zip
external_llvm-e57343b6365df5b7318c5076f917ad40cf621555.tar.gz
external_llvm-e57343b6365df5b7318c5076f917ad40cf621555.tar.bz2
Fix handling of CHECK-DAG combined with CHECK-NOT
Patch by Daniel Sanders. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/FileCheck')
-rw-r--r--utils/FileCheck/FileCheck.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp
index e252db9..8d5af58 100644
--- a/utils/FileCheck/FileCheck.cpp
+++ b/utils/FileCheck/FileCheck.cpp
@@ -1013,8 +1013,7 @@ size_t CheckString::CheckDag(const SourceMgr &SM, StringRef Buffer,
// CHECK-DAG, verify that there's no 'not' strings occurred in that
// region.
StringRef SkippedRegion = Buffer.substr(LastPos, MatchPos);
- size_t Pos = CheckNot(SM, SkippedRegion, NotStrings, VariableTable);
- if (Pos != StringRef::npos)
+ if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable))
return StringRef::npos;
// Clear "not strings".
NotStrings.clear();