Skip to content

Commit 6a26e22

Browse files
committed
[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.
1 parent 9f8988a commit 6a26e22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/test/clang-tidy/check_clang_tidy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def parse_arguments() -> Tuple[argparse.Namespace, List[str]]:
392392
if args.std is None:
393393
_, extension = os.path.splitext(args.assume_filename or args.input_file_name)
394394
args.std = [
395-
"c++11-or-later" if extension in [".cpp", ".hpp", ".mm"] else "c99-or-later"
395+
"c99-or-later" if extension in [".c", ".m"] else "c++11-or-later"
396396
]
397397

398398
return (args, extra_args)

0 commit comments

Comments
 (0)