Skip to content

Commit

Permalink
Fix python SyntaxWarnings in check-all output (#72538)
Browse files Browse the repository at this point in the history
By converting the offending strings to raw string literals.
  • Loading branch information
eleftg committed Nov 17, 2023
1 parent 12bdbe2 commit 2402b14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, templateClasses):

def GeneratePrologue(self):

self.implementationContent += """
self.implementationContent += r"""
/*===- Generated file -------------------------------------------*- C++ -*-===*\
|* *|
|* Introspection of available AST node SourceLocations *|
Expand Down
6 changes: 3 additions & 3 deletions compiler-rt/test/lit.common.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def is_windows_lto_supported():
config.substitutions.append(
(
"%ld_flags_rpath_exe" + postfix,
"-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
r"-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
+ postfix,
)
)
Expand All @@ -809,15 +809,15 @@ def is_windows_lto_supported():
config.substitutions.append(
(
"%ld_flags_rpath_exe" + postfix,
"-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
r"-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
)
)
config.substitutions.append(("%ld_flags_rpath_so" + postfix, ""))
elif config.host_os == "SunOS":
config.substitutions.append(
(
"%ld_flags_rpath_exe" + postfix,
"-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
r"-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
)
)
config.substitutions.append(("%ld_flags_rpath_so" + postfix, ""))
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def ptxas_version(ptxas):
ptxas_cmd = subprocess.Popen([ptxas, "--version"], stdout=subprocess.PIPE)
ptxas_out = ptxas_cmd.stdout.read().decode("ascii")
ptxas_cmd.wait()
match = re.search("release (\d+)\.(\d+)", ptxas_out)
match = re.search(r"release (\d+)\.(\d+)", ptxas_out)
if match:
return (int(match.group(1)), int(match.group(2)))
print("couldn't determine ptxas version")
Expand Down

0 comments on commit 2402b14

Please sign in to comment.