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
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp
index 8f48c3a..a6c1f74 100644
--- a/utils/FileCheck/FileCheck.cpp
+++ b/utils/FileCheck/FileCheck.cpp
@@ -361,10 +361,10 @@
     }
     
 
-    // 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;