[polly] 5609724 - [Polly] Fix invalid escape sequences (#94037)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 04:05:13 PST 2025
Author: Eisuke Kawashima
Date: 2025-01-13T13:05:10+01:00
New Revision: 5609724c2e5b59130c6fcfc128120777282c8d9a
URL: https://github.com/llvm/llvm-project/commit/5609724c2e5b59130c6fcfc128120777282c8d9a
DIFF: https://github.com/llvm/llvm-project/commit/5609724c2e5b59130c6fcfc128120777282c8d9a.diff
LOG: [Polly] Fix invalid escape sequences (#94037)
These generate a SyntaxWarning since Python 3.12.
Added:
Modified:
polly/test/update_check.py
Removed:
################################################################################
diff --git a/polly/test/update_check.py b/polly/test/update_check.py
index 88d95c247c0630..a973c72ff4e78e 100644
--- a/polly/test/update_check.py
+++ b/polly/test/update_check.py
@@ -222,7 +222,12 @@ def classyfier2(lines):
line = i.__next__()
-replrepl = {"{{": "{{[{][{]}}", "}}": "{{[}][}]}}", "[[": "{{\[\[}}", "]]": "{{\]\]}}"}
+replrepl = {
+ "{{": "{{[{][{]}}",
+ "}}": "{{[}][}]}}",
+ "[[": r"{{\[\[}}",
+ "]]": r"{{\]\]}}",
+}
replre = re.compile("|".join(re.escape(k) for k in replrepl.keys()))
@@ -452,7 +457,7 @@ def main():
checkre = re.compile(
r"^\s*\;\s*("
+ "|".join([re.escape(s) for s in checkprefixes])
- + ")(\-NEXT|\-DAG|\-NOT|\-LABEL|\-SAME)?\s*\:"
+ + r")(\-NEXT|\-DAG|\-NOT|\-LABEL|\-SAME)?\s*\:"
)
firstcheckline = None
firstnoncommentline = None
More information about the llvm-commits
mailing list