[clang-tools-extra] [clang-tidy][NFC] Don't store a redundant copy of `HeaderFileExtensions` in every check (PR #190302)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 2 19:48:41 PDT 2026
================
@@ -480,6 +480,16 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback {
ClangTidyContext *Context;
};
+ /// Returns the list of header file extensions from the context.
+ const FileExtensionsSet &getHeaderFileExtensions() const {
+ return Context->getHeaderFileExtensions();
+ }
+
+ /// Returns the list of implementation file extensions from the context.
+ const FileExtensionsSet &getImplementationFileExtensions() const {
+ return Context->getImplementationFileExtensions();
+ }
----------------
localspook wrote:
These getters are public, *unlike* the existing getters below, which are protected. I made them public because `bugprone-suspicious-include` defines a `PPCallbacks` which wants to call them. I don't see a problem with making them (or even the existing ones) public, but maybe someone does?
https://github.com/llvm/llvm-project/pull/190302
More information about the cfe-commits
mailing list