Author: Georgios Eleftheriou Date: 2023-11-17T16:40:21-05:00 New Revision: 2402b14046b9628b584c07789830d7ed481f7d74
URL: https://github.com/llvm/llvm-project/commit/2402b14046b9628b584c07789830d7ed481f7d74 DIFF: https://github.com/llvm/llvm-project/commit/2402b14046b9628b584c07789830d7ed481f7d74.diff LOG: Fix python SyntaxWarnings in check-all output (#72538) By converting the offending strings to raw string literals. Added: Modified: clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py compiler-rt/test/lit.common.cfg.py llvm/test/lit.cfg.py Removed: ################################################################################ diff --git a/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py b/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py index dafb332961ede86..7671f9691c09610 100755 --- a/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py +++ b/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py @@ -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 *| diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py index 230efd580199cb6..7a91558d515420f 100644 --- a/compiler-rt/test/lit.common.cfg.py +++ b/compiler-rt/test/lit.common.cfg.py @@ -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, ) ) @@ -809,7 +809,7 @@ 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, "")) @@ -817,7 +817,7 @@ def is_windows_lto_supported(): 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, "")) diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py index f3b49a398e76062..8319093408020fc 100644 --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -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") _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits