[PATCH] D142655: [WIP][clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions options
Carlos Galvez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 26 13:35:06 PST 2023
carlosgalvezp added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:233-234
+ utils::FileExtensionsSet HeaderFileExtensions;
+ utils::FileExtensionsSet ImplementationFileExtensions;
+
----------------
@njames93 Would appreciate feedback on if putting these here sounds reasonable.
================
Comment at: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp:32-43
+ Options.get("HeaderFileExtensions");
+ RawStringHeaderFileExtensions =
+ HeaderFileExtensionsOption.value_or(utils::defaultHeaderFileExtensions());
+ if (HeaderFileExtensionsOption) {
+ if (!utils::parseFileExtensions(RawStringHeaderFileExtensions,
+ HeaderFileExtensions,
+ utils::defaultFileExtensionDelimiters())) {
----------------
This is messy, but only needs to be kept during the transition period until the local option is fully removed. After that, checks simply need to call the function `getHeaderFileExtensions()` that is available via `ClangTidyCheck` where needed. Therefore, no more private local variables needed to handle this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142655/new/
https://reviews.llvm.org/D142655
More information about the cfe-commits
mailing list