aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorLuke Lau <luke@igalia.com>2024-02-20 17:36:01 +0800
committerGitHub <noreply@github.com>2024-02-20 17:36:01 +0800
commit283a6b9936657712f61c38459c87507e587e3625 (patch)
tree7c10c265fce7f912c4880b774bafef10341d075d /llvm/utils/UpdateTestChecks/common.py
parent9fa18f65983ba761c9fbf7be4c67801a14bf4b34 (diff)
downloadllvm-283a6b9936657712f61c38459c87507e587e3625.zip
llvm-283a6b9936657712f61c38459c87507e587e3625.tar.gz
llvm-283a6b9936657712f61c38459c87507e587e3625.tar.bz2
[UTC] Fix SyntaxWarning on Python 3.12 (#82327)
On Python 3.12 we now get a warning in common.py: llvm/utils/UpdateTestChecks/common.py:488: SyntaxWarning: invalid escape sequence '\s' This fixes it by using a raw string literal, see https://github.com/llvm/llvm-project/pull/78036 and https://docs.python.org/3/library/re.html
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r--llvm/utils/UpdateTestChecks/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 75c6e43..4a02a92 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -485,7 +485,7 @@ CHECK_RE = re.compile(
)
UTC_ARGS_KEY = "UTC_ARGS:"
-UTC_ARGS_CMD = re.compile(r".*" + UTC_ARGS_KEY + "\s*(?P<cmd>.*)\s*$")
+UTC_ARGS_CMD = re.compile(r".*" + UTC_ARGS_KEY + r"\s*(?P<cmd>.*)\s*$")
UTC_ADVERT = "NOTE: Assertions have been autogenerated by "
UTC_AVOID = "NOTE: Do not autogenerate"
UNUSED_NOTE = "NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:"