[clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions options
We have a number of checks designed to analyze problems in header files only, for example: bugprone-suspicious-include google-build-namespaces llvm-header-guard misc-definitions-in-header ... All these checks duplicate the same logic and options to determine whether a location is placed in the main source file or in the header. More checks are coming up with similar requirements. Thus, to remove duplication, let's move this option to the top-level configuration of clang-tidy (since it's something all checks should share). Since the checks fetch the option via getLocalOrGlobal, the behavior is unchanged. Add a deprecation notice for all checks that use the local option, prompting to update to the global option. The functionality for parsing the option will need to remain in the checks during the transition period. Once the local options are fully removed, the goal is to store the parsed options in the ClangTidyContext, that checks can easily have access to. Differential Revision: https://reviews.llvm.org/D141000
Loading
Please sign in to comment