[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions options
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 14 10:12:19 PST 2023
njames93 added a comment.
On the topic of Objective-C, they use `.m` and `.M` extensions, it may be worth pointing out that this list is case sensitive (I'm assuming that's going to be the case.)
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:151-152
Options.WarningsAsErrors = "";
+ Options.HeaderFileExtensions = {"h", "hh", "hpp", "hxx"};
+ Options.ImplementationFileExtensions = {"c", "cc", "cpp", "cxx"};
Options.HeaderFilterRegex = "";
----------------
clang-tidy also works on ObjectiveC, ObjectiveC++ and cuda source files, We shouldn't be ignoring those in the defaults here.
Also some libraries(including the standard library) make use of extension-less header files, maybe its worth adding an empty entry in the header file extensions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141000/new/
https://reviews.llvm.org/D141000
More information about the cfe-commits
mailing list