On Windows, if the substitution contains a back reference, it would
removed due to the replacement of the escape character in lit. Create a
helper class to avoid this which will simply ignore the replacement and
mark the substitution as having capture groups being referenced.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
lgtm
utils/lit/lit/TestingConfig.py | ||
---|---|---|
157 | Since there is no user of this in LLVM, can you put some example usage code in the docstring? In lit.cfg, use this code to create substitutions with regex backreferences: config.substutions.append(('\b[^ ]*.cpp', SubstituteCaptures('\0.txt'))) |
utils/lit/lit/TestingConfig.py | ||
---|---|---|
157 | Alternatively, add a lit lit test for it. |
Since there is no user of this in LLVM, can you put some example usage code in the docstring? In lit.cfg, use this code to create substitutions with regex backreferences: