Skip to content

Commit 2402b14

Browse files
authored
Fix python SyntaxWarnings in check-all output (#72538)
By converting the offending strings to raw string literals.
1 parent 12bdbe2 commit 2402b14

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, templateClasses):
2525

2626
def GeneratePrologue(self):
2727

28-
self.implementationContent += """
28+
self.implementationContent += r"""
2929
/*===- Generated file -------------------------------------------*- C++ -*-===*\
3030
|* *|
3131
|* Introspection of available AST node SourceLocations *|

compiler-rt/test/lit.common.cfg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ def is_windows_lto_supported():
800800
config.substitutions.append(
801801
(
802802
"%ld_flags_rpath_exe" + postfix,
803-
"-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
803+
r"-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
804804
+ postfix,
805805
)
806806
)
@@ -809,15 +809,15 @@ def is_windows_lto_supported():
809809
config.substitutions.append(
810810
(
811811
"%ld_flags_rpath_exe" + postfix,
812-
"-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
812+
r"-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
813813
)
814814
)
815815
config.substitutions.append(("%ld_flags_rpath_so" + postfix, ""))
816816
elif config.host_os == "SunOS":
817817
config.substitutions.append(
818818
(
819819
"%ld_flags_rpath_exe" + postfix,
820-
"-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
820+
r"-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
821821
)
822822
)
823823
config.substitutions.append(("%ld_flags_rpath_so" + postfix, ""))

llvm/test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def ptxas_version(ptxas):
271271
ptxas_cmd = subprocess.Popen([ptxas, "--version"], stdout=subprocess.PIPE)
272272
ptxas_out = ptxas_cmd.stdout.read().decode("ascii")
273273
ptxas_cmd.wait()
274-
match = re.search("release (\d+)\.(\d+)", ptxas_out)
274+
match = re.search(r"release (\d+)\.(\d+)", ptxas_out)
275275
if match:
276276
return (int(match.group(1)), int(match.group(2)))
277277
print("couldn't determine ptxas version")

0 commit comments

Comments
 (0)