[clang-tidy][NFC] Don't call getLangOpts in isLanguageVersionSupported (#184029)

This is just a little inconsistency I noticed. Basically all checks
inspect the `LangOpts` parameter, but these two ignore the parameter and
call `getLangOpts` instead.
This commit is contained in:
Victor Chernyakin 2026-03-01 12:50:53 -07:00 committed by GitHub
parent d1d2a1ed76
commit cf1e76835f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ public:
ThrowingStaticInitializationCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
return getLangOpts().CPlusPlus && getLangOpts().CXXExceptions;
return LangOpts.CPlusPlus && LangOpts.CXXExceptions;
}
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;

View File

@ -20,7 +20,7 @@ public:
UseNewMlirOpBuilderCheck(StringRef Name, ClangTidyContext *Context);
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
return getLangOpts().CPlusPlus;
return LangOpts.CPlusPlus;
}
};