summaryrefslogtreecommitdiff
path: root/utils/FileCheck
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-06-07 12:06:45 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-06-07 12:06:45 +0000
commit5a998740d1db1db968644fd72a6462f0152faf56 (patch)
treeed6aef8e9feb35a1ced9fab17e7fa32a005f63c1 /utils/FileCheck
parentf5c9f9539692a0ff3f1f32ffca6ecc11d9cdf380 (diff)
[FileCheck] Don't scan past the closing CHECK-DAG for CHECK-NOT inside CHECK-DAG
If there's enough data in fron of it the skipped region would just become arbitrarily large, and we scan for the CHECK-NOT everywhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304900 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/FileCheck')
-rw-r--r--utils/FileCheck/FileCheck.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp
index f563cadc92c..9d808cc875c 100644
--- a/utils/FileCheck/FileCheck.cpp
+++ b/utils/FileCheck/FileCheck.cpp
@@ -1203,7 +1203,7 @@ size_t CheckString::CheckDag(const SourceMgr &SM, StringRef Buffer,
// If there's CHECK-NOTs between two CHECK-DAGs or from CHECK to
// CHECK-DAG, verify that there's no 'not' strings occurred in that
// region.
- StringRef SkippedRegion = Buffer.substr(LastPos, MatchPos);
+ StringRef SkippedRegion = Buffer.slice(LastPos, MatchPos);
if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable))
return StringRef::npos;
// Clear "not strings".