[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 13:11:52 PST 2022


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

Mention change in the Release Notes.


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
@@ -201,6 +201,9 @@
   The check now skips concept definitions since redundant expressions still make sense
   inside them.
 
+- 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.
+
 Removed 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.482611.patch
Type: text/x-patch
Size: 1243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221213/998f5001/attachment.bin>


More information about the cfe-commits mailing list