This revision was automatically updated to reflect the committed changes. Closed by commit rL363296: [clang-tidy] Make ClangTidyCheck::OptionsView public. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D63287?vs=204579&id=204600#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63287/new/ https://reviews.llvm.org/D63287 Files: clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h Index: clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h =================================================================== --- clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h +++ clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h @@ -100,13 +100,6 @@ /// whether it has the default value or it has been overridden. virtual void storeOptions(ClangTidyOptions::OptionMap &Options) {} -private: - void run(const ast_matchers::MatchFinder::MatchResult &Result) override; - StringRef getID() const override { return CheckName; } - std::string CheckName; - ClangTidyContext *Context; - -protected: /// \brief Provides access to the ``ClangTidyCheck`` options via check-local /// names. /// @@ -181,6 +174,13 @@ const ClangTidyOptions::OptionMap &CheckOptions; }; +private: + void run(const ast_matchers::MatchFinder::MatchResult &Result) override; + StringRef getID() const override { return CheckName; } + std::string CheckName; + ClangTidyContext *Context; + +protected: OptionsView Options; /// \brief Returns the main file name of the current translation unit. StringRef getCurrentMainFile() const { return Context->getCurrentFile(); }
Index: clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h =================================================================== --- clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h +++ clang-tools-extra/trunk/clang-tidy/ClangTidyCheck.h @@ -100,13 +100,6 @@ /// whether it has the default value or it has been overridden. virtual void storeOptions(ClangTidyOptions::OptionMap &Options) {} -private: - void run(const ast_matchers::MatchFinder::MatchResult &Result) override; - StringRef getID() const override { return CheckName; } - std::string CheckName; - ClangTidyContext *Context; - -protected: /// \brief Provides access to the ``ClangTidyCheck`` options via check-local /// names. /// @@ -181,6 +174,13 @@ const ClangTidyOptions::OptionMap &CheckOptions; }; +private: + void run(const ast_matchers::MatchFinder::MatchResult &Result) override; + StringRef getID() const override { return CheckName; } + std::string CheckName; + ClangTidyContext *Context; + +protected: OptionsView Options; /// \brief Returns the main file name of the current translation unit. StringRef getCurrentMainFile() const { return Context->getCurrentFile(); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits