[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:
parent
d1d2a1ed76
commit
cf1e76835f
@ -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;
|
||||
|
||||
@ -20,7 +20,7 @@ public:
|
||||
UseNewMlirOpBuilderCheck(StringRef Name, ClangTidyContext *Context);
|
||||
|
||||
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
|
||||
return getLangOpts().CPlusPlus;
|
||||
return LangOpts.CPlusPlus;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user