[PATCH] D79419: [clang/clang-tools-extra] Fix BZ44437 - add_new_check.py does not work with Python 3
Konrad Wilhelm Kleine via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 5 14:36:10 PDT 2020
kwk updated this revision to Diff 262226.
kwk added a comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79419/new/
https://reviews.llvm.org/D79419
Files:
clang-tools-extra/clang-tidy/add_new_check.py
Index: clang-tools-extra/clang-tidy/add_new_check.py
===================================================================
--- clang-tools-extra/clang-tidy/add_new_check.py
+++ clang-tools-extra/clang-tidy/add_new_check.py
@@ -172,7 +172,7 @@
lines = iter(lines)
try:
while True:
- line = lines.next()
+ line = next(lines)
if not header_added:
match = re.search('#include "(.*)"', line)
if match:
@@ -197,7 +197,7 @@
# If we didn't find the check name on this line, look on the
# next one.
prev_line = line
- line = lines.next()
+ line = next(lines)
match = re.search(' *"([^"]*)"', line)
if match:
current_check_name = match.group(1)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79419.262226.patch
Type: text/x-patch
Size: 829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200505/8db71388/attachment.bin>
More information about the cfe-commits
mailing list