https://github.com/jyknight updated 
https://github.com/llvm/llvm-project/pull/156528

>From 6a26e22e546a0da94dc550e88008e9a880f2ea24 Mon Sep 17 00:00:00 2001
From: Walter Lee <wa...@google.com>
Date: Tue, 2 Sep 2025 16:32:32 -0400
Subject: [PATCH 1/2] [clang-tidy] Fix file extension inconsistency from
 #150791

In CheckRunner, we treat files with unrecognized extensions as ".cpp".
Make the new code be consistent with that.
---
 clang-tools-extra/test/clang-tidy/check_clang_tidy.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py 
b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
index d80a28044ea0a..cf066ac21b12f 100755
--- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
+++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
@@ -392,7 +392,7 @@ def parse_arguments() -> Tuple[argparse.Namespace, 
List[str]]:
     if args.std is None:
         _, extension = os.path.splitext(args.assume_filename or 
args.input_file_name)
         args.std = [
-            "c++11-or-later" if extension in [".cpp", ".hpp", ".mm"] else 
"c99-or-later"
+            "c99-or-later" if extension in [".c", ".m"] else "c++11-or-later"
         ]
 
     return (args, extra_args)

>From f6b639e2c3fdf1e90f781eca15ce76fd5b1b6d52 Mon Sep 17 00:00:00 2001
From: James Y Knight <jykni...@google.com>
Date: Tue, 2 Sep 2025 17:01:30 -0400
Subject: [PATCH 2/2] Fix python formatting.

---
 clang-tools-extra/test/clang-tidy/check_clang_tidy.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py 
b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
index cf066ac21b12f..3eaba0e9dff3a 100755
--- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
+++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
@@ -391,9 +391,7 @@ def parse_arguments() -> Tuple[argparse.Namespace, 
List[str]]:
     args, extra_args = parser.parse_known_args()
     if args.std is None:
         _, extension = os.path.splitext(args.assume_filename or 
args.input_file_name)
-        args.std = [
-            "c99-or-later" if extension in [".c", ".m"] else "c++11-or-later"
-        ]
+        args.std = ["c99-or-later" if extension in [".c", ".m"] else 
"c++11-or-later"]
 
     return (args, extra_args)
 

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to