From 81115765218f1c1505ab6faf843ee4baf292d45f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 21 Sep 2009 02:30:42 +0000 Subject: fix a FileCheck bug where: ; CHECK: foo ; CHECK-NOT: foo ; CHECK: bar would always fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82424 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/FileCheck/FileCheck.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils/FileCheck/FileCheck.cpp') diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp index 8f48c3a0cf..a6c1f74f6d 100644 --- a/utils/FileCheck/FileCheck.cpp +++ b/utils/FileCheck/FileCheck.cpp @@ -361,10 +361,10 @@ int main(int argc, char **argv) { } - // Otherwise, everything is good. Remember this as the last match and move - // on to the next one. - LastMatch = Buffer.data(); + // Otherwise, everything is good. Step over the matched text and remember + // the position after the match as the end of the last match. Buffer = Buffer.substr(CheckStr.Str.size()); + LastMatch = Buffer.data(); } return 0; -- cgit v1.2.3-18-g5258