commit | 061d2baa572d4caf4aaa4c9f67c834c7154c7c2a | [log] [tgz] |
---|---|---|
author | Eli Bendersky <eliben@google.com> | Sun Dec 02 16:02:41 2012 +0000 |
committer | Eli Bendersky <eliben@google.com> | Sun Dec 02 16:02:41 2012 +0000 |
tree | 402d88ab8155bc4559e1714b3d1191f65280ee84 | |
parent | b7b1ffc8e714ed82dc52d64b2ec9498526c7ed4a [diff] |
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. llvm-svn: 169109