[PATCH] D139966: [clang-tidy] Use Python3 for add_new_check.py and rename_check.py

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 13 22:43:52 PST 2022


carlosgalvezp updated this revision to Diff 482721.
carlosgalvezp added a comment.

Address comments


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139966/new/

https://reviews.llvm.org/D139966

Files:
  clang-tools-extra/clang-tidy/add_new_check.py
  clang-tools-extra/clang-tidy/rename_check.py
  clang-tools-extra/docs/ReleaseNotes.rst


Index: clang-tools-extra/docs/ReleaseNotes.rst
===================================================================
--- clang-tools-extra/docs/ReleaseNotes.rst
+++ clang-tools-extra/docs/ReleaseNotes.rst
@@ -96,6 +96,9 @@
 Improvements to clang-tidy
 --------------------------
 
+- Change to Python 3 in the shebang of `add_new_check.py` and `rename_check.py`, as the existing
+  code is not compatible with Python 2.
+
 New checks
 ^^^^^^^^^^
 
Index: clang-tools-extra/clang-tidy/rename_check.py
===================================================================
--- clang-tools-extra/clang-tidy/rename_check.py
+++ clang-tools-extra/clang-tidy/rename_check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #===- rename_check.py - clang-tidy check renamer ------------*- python -*--===#
 #
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
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #===- add_new_check.py - clang-tidy check generator ---------*- python -*--===#
 #


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139966.482721.patch
Type: text/x-patch
Size: 1185 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221214/f228af08/attachment.bin>


More information about the cfe-commits mailing list