llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Victor Chernyakin (localspook) <details> <summary>Changes</summary> 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. --- Full diff: https://github.com/llvm/llvm-project/pull/184029.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/ThrowingStaticInitializationCheck.h (+1-1) - (modified) clang-tools-extra/clang-tidy/llvm/UseNewMLIROpBuilderCheck.h (+1-1) ``````````diff diff --git a/clang-tools-extra/clang-tidy/bugprone/ThrowingStaticInitializationCheck.h b/clang-tools-extra/clang-tidy/bugprone/ThrowingStaticInitializationCheck.h index 4ec554fc78fc6..a25d7fe889e16 100644 --- a/clang-tools-extra/clang-tidy/bugprone/ThrowingStaticInitializationCheck.h +++ b/clang-tools-extra/clang-tidy/bugprone/ThrowingStaticInitializationCheck.h @@ -23,7 +23,7 @@ class ThrowingStaticInitializationCheck : public ClangTidyCheck { 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; diff --git a/clang-tools-extra/clang-tidy/llvm/UseNewMLIROpBuilderCheck.h b/clang-tools-extra/clang-tidy/llvm/UseNewMLIROpBuilderCheck.h index 0842699823a65..28c7477a18f7f 100644 --- a/clang-tools-extra/clang-tidy/llvm/UseNewMLIROpBuilderCheck.h +++ b/clang-tools-extra/clang-tidy/llvm/UseNewMLIROpBuilderCheck.h @@ -20,7 +20,7 @@ class UseNewMlirOpBuilderCheck : public utils::TransformerClangTidyCheck { UseNewMlirOpBuilderCheck(StringRef Name, ClangTidyContext *Context); bool isLanguageVersionSupported(const LangOptions &LangOpts) const override { - return getLangOpts().CPlusPlus; + return LangOpts.CPlusPlus; } }; `````````` </details> https://github.com/llvm/llvm-project/pull/184029 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
