[clang-tools-extra] d63be47 - [clang-tidy] fix(clang-tools-extra/**.py): fix invalid escape sequences (#94028)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 10 12:05:44 PDT 2024
Author: Eisuke Kawashima
Date: 2024-06-10T21:05:40+02:00
New Revision: d63be475e889ba3361799f6907b3c95354684c7d
URL: https://github.com/llvm/llvm-project/commit/d63be475e889ba3361799f6907b3c95354684c7d
DIFF: https://github.com/llvm/llvm-project/commit/d63be475e889ba3361799f6907b3c95354684c7d.diff
LOG: [clang-tidy] fix(clang-tools-extra/**.py): fix invalid escape sequences (#94028)
Added:
Modified:
clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py
clang-tools-extra/docs/clang-tidy/checks/gen-static-analyzer-docs.py
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/tool/clang-tidy-
diff .py b/clang-tools-extra/clang-tidy/tool/clang-tidy-
diff .py
index d96b3450fdbe8..b048460abf2fc 100755
--- a/clang-tools-extra/clang-tidy/tool/clang-tidy-
diff .py
+++ b/clang-tools-extra/clang-tidy/tool/clang-tidy-
diff .py
@@ -242,7 +242,7 @@ def main():
filename = None
lines_by_file = {}
for line in sys.stdin:
- match = re.search('^\+\+\+\ "?(.*?/){%s}([^ \t\n"]*)' % args.p, line)
+ match = re.search('^\\+\\+\\+\\ "?(.*?/){%s}([^ \t\n"]*)' % args.p, line)
if match:
filename = match.group(2)
if filename is None:
@@ -255,7 +255,7 @@ def main():
if not re.match("^%s$" % args.iregex, filename, re.IGNORECASE):
continue
- match = re.search("^@@.*\+(\d+)(,(\d+))?", line)
+ match = re.search(r"^@@.*\+(\d+)(,(\d+))?", line)
if match:
start_line = int(match.group(1))
line_count = 1
diff --git a/clang-tools-extra/docs/clang-tidy/checks/gen-static-analyzer-docs.py b/clang-tools-extra/docs/clang-tidy/checks/gen-static-analyzer-docs.py
index 53ecb60dec539..8408ef5123ab3 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/gen-static-analyzer-docs.py
+++ b/clang-tools-extra/docs/clang-tidy/checks/gen-static-analyzer-docs.py
@@ -59,7 +59,7 @@ def get_checkers(checkers_td, checkers_rst):
"clang-analyzer-" + checker_package_prefix + "." + checker_name
)
anchor_url = re.sub(
- "\.", "-", checker_package_prefix + "." + checker_name
+ r"\.", "-", checker_package_prefix + "." + checker_name
).lower()
if not hidden and "alpha" not in full_package_name.lower():
More information about the cfe-commits
mailing list