diff options
author | Eli Bendersky <eliben@google.com> | 2012-12-02 16:02:41 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2012-12-02 16:02:41 +0000 |
commit | 4db6511779e70780f7b36bb7ef54276752f5f640 (patch) | |
tree | bef8603130686d76ac40a05ab83c69929b6aaf11 /test/FileCheck/simple-var-capture.txt | |
parent | e4693642444e8405a8f5812a3594372f7f108e9e (diff) | |
download | llvm-4db6511779e70780f7b36bb7ef54276752f5f640.tar.gz llvm-4db6511779e70780f7b36bb7ef54276752f5f640.tar.bz2 llvm-4db6511779e70780f7b36bb7ef54276752f5f640.tar.xz |
Fix a bug in FileCheck that wouldn't let define variables as follows:
; CHECK: [[VAR:[a-z]]]
The problem was that to find the end of the regex var definition, it was
simplistically looking for the next ]] and finding the incorrect one. A
better approach is to count nesting of brackets (taking escaping into
account). This way the brackets that are part of the regex can be discovered
and skipped properly, and the ]] ending is detected in the right place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FileCheck/simple-var-capture.txt')
-rw-r--r-- | test/FileCheck/simple-var-capture.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/FileCheck/simple-var-capture.txt b/test/FileCheck/simple-var-capture.txt index c0214d9017..a487baaa53 100644 --- a/test/FileCheck/simple-var-capture.txt +++ b/test/FileCheck/simple-var-capture.txt @@ -2,7 +2,7 @@ op1 r1 op2 r1, r2 -; CHECK: op1 [[REG:r[0-9]+]] +; CHECK: op1 [[REG:r[0-9]]] ; CHECK-NEXT: op2 [[REG]] op3 r16, r18, r21 @@ -10,3 +10,4 @@ op4 r30, r18, r21 ; CHECK: op3 {{r[0-9]+}}, [[REGa:r[0-9]+]], [[REGb:r[0-9]+]] ; CHECK-NEXT: op4 {{r[0-9]+}}, [[REGa]], [[REGb]] + |