[PATCH] D57528: [tools] Fix python DeprecationWarning: invalid escape sequence
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 11 07:03:09 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL353707: [tools] Fix python DeprecationWarning: invalid escape sequence (authored by serge_sans_paille, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D57528?vs=184547&id=186248#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57528/new/
https://reviews.llvm.org/D57528
Files:
cfe/trunk/tools/clang-format/clang-format-diff.py
cfe/trunk/tools/scan-build-py/libscanbuild/analyze.py
cfe/trunk/tools/scan-build/bin/set-xcode-analyzer
Index: cfe/trunk/tools/scan-build/bin/set-xcode-analyzer
===================================================================
--- cfe/trunk/tools/scan-build/bin/set-xcode-analyzer
+++ cfe/trunk/tools/scan-build/bin/set-xcode-analyzer
@@ -42,7 +42,7 @@
if line.find("Static Analyzer") >= 0:
foundAnalyzer = True
else:
- m = re.search('^(\s*ExecPath\s*=\s*")', line)
+ m = re.search(r'^(\s*ExecPath\s*=\s*")', line)
if m:
line = "".join([m.group(0), pathToChecker, '";\n'])
# Do not modify further ExecPath's later in the xcspec.
Index: cfe/trunk/tools/clang-format/clang-format-diff.py
===================================================================
--- cfe/trunk/tools/clang-format/clang-format-diff.py
+++ cfe/trunk/tools/clang-format/clang-format-diff.py
@@ -66,7 +66,7 @@
filename = None
lines_by_file = {}
for line in sys.stdin:
- match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
+ match = re.search(r'^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
if match:
filename = match.group(2)
if filename == None:
@@ -79,7 +79,7 @@
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
Index: cfe/trunk/tools/scan-build-py/libscanbuild/analyze.py
===================================================================
--- cfe/trunk/tools/scan-build-py/libscanbuild/analyze.py
+++ cfe/trunk/tools/scan-build-py/libscanbuild/analyze.py
@@ -97,7 +97,7 @@
when compiler wrappers are used. That's the moment when build setup
check the compiler and capture the location for the build process. """
- return len(args) and not re.search('configure|autogen', args[0])
+ return len(args) and not re.search(r'configure|autogen', args[0])
def prefix_with(constant, pieces):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57528.186248.patch
Type: text/x-patch
Size: 2014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190211/2a88aa6c/attachment-0001.bin>
More information about the cfe-commits
mailing list