summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authord0k <d0k@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-18 20:51:39 +0000
committerd0k <d0k@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-18 20:51:39 +0000
commit24f85f2471f21d5a107905de06ed030e4464c555 (patch)
tree435be6dd1a2086e0f4c70c69138da4a31cdfa149 /utils
parente7fa52c2c5cd1a042b177a2d3f4ccc3c7a18dca8 (diff)
FileCheck: Fix off-by-one bug that made CHECK-NOT: ignore the next character after the colon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164165 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/FileCheck/FileCheck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp
index 33f04ce647..afbce35af5 100644
--- a/utils/FileCheck/FileCheck.cpp
+++ b/utils/FileCheck/FileCheck.cpp
@@ -537,11 +537,11 @@ static bool ReadCheckFile(SourceMgr &SM,
Buffer = Buffer.substr(CheckPrefix.size()+1);
} else if (Buffer.size() > CheckPrefix.size()+6 &&
memcmp(Buffer.data()+CheckPrefix.size(), "-NEXT:", 6) == 0) {
- Buffer = Buffer.substr(CheckPrefix.size()+7);
+ Buffer = Buffer.substr(CheckPrefix.size()+6);
IsCheckNext = true;
} else if (Buffer.size() > CheckPrefix.size()+5 &&
memcmp(Buffer.data()+CheckPrefix.size(), "-NOT:", 5) == 0) {
- Buffer = Buffer.substr(CheckPrefix.size()+6);
+ Buffer = Buffer.substr(CheckPrefix.size()+5);
IsCheckNot = true;
} else {
Buffer = Buffer.substr(1);