[llvm] fix(llvm/**.py): fix invalid escape sequences (PR #94035)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 05:39:15 PST 2025
================
@@ -17,24 +17,24 @@ def remove_prefix(i, d=0):
p = r.group(1)
s = re.sub("=" + p + ",", "=", s)
s = re.sub("," + p + "([, \n])", "\\1", s)
- s = re.sub("\s+-?-check-prefix=" + p + "([ \n])", "\\1", s)
+ s = re.sub("\\s+-?-check-prefix=" + p + "([ \n])", "\\1", s)
else:
s = re.sub(
- "-?-check-prefixes=([\w-]+)(\Z|[ \t\n])", "--check-prefix=\\1\\2", s
+ "-?-check-prefixes=([\\w-]+)(\\Z|[ \t\n])", "--check-prefix=\\1\\2", s
----------------
nikic wrote:
```suggestion
r "-?-check-prefixes=([\w-]+)(\Z|[ \t\n])", "--check-prefix=\\1\\2", s
```
https://github.com/llvm/llvm-project/pull/94035
More information about the llvm-commits
mailing list