[llvm] fix(llvm/**.py): fix invalid escape sequences (PR #94035)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 9 01:00:29 PDT 2024
================
@@ -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)
----------------
nikic wrote:
I'd prefer to use raw strings here as well. `\n` is both a python and regex escape sequence, and there's no need to use the python one here, if it makes things less similar to other places.
https://github.com/llvm/llvm-project/pull/94035
More information about the llvm-commits
mailing list