[all-commits] [llvm/llvm-project] 43af73: [lit] Use raw strings for backslash escapes to fix...
h-vetinari via All-commits
all-commits at lists.llvm.org
Mon Nov 20 02:04:23 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 43af73f0d0c02fae5c4652f8248e4b614080695b
https://github.com/llvm/llvm-project/commit/43af73f0d0c02fae5c4652f8248e4b614080695b
Author: h-vetinari <h.vetinari at gmx.com>
Date: 2023-11-20 (Mon, 20 Nov 2023)
Changed paths:
Log Message:
-----------
[lit] Use raw strings for backslash escapes to fix SyntaxWarnings (#70907)
Unless specified as a "raw" string, Python will try to interpret
backslashes, which means they don't get passed on correctly to the
underlying regex-engine, unless escaped manually (`\\`).
Use raw strings in `llvm/test/lit.cfg.py` to avoid a `SyntaxWarning`:
```
llvm/test/lit.cfg.py:275: SyntaxWarning: invalid escape sequence '\d'
match = re.search("release (\d+)\.(\d+)", ptxas_out)
```
Other such warning present in 17.0.x were already fixed in
7ed0f5b6de74989c739389770a2d45dc7d58166a.
More information about the All-commits
mailing list