aboutsummaryrefslogtreecommitdiff
path: root/utils/FileCheck/FileCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/FileCheck/FileCheck.cpp')
-rw-r--r--utils/FileCheck/FileCheck.cpp6
1 files changed, 3 insertions, 3 deletions
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;