alexfh created this revision. alexfh added reviewers: sammccall, hokein. Herald added subscribers: kadircet, arphaman, jkorous, xazax.hun. Herald added a project: clang.
All in-tree clang-tidy checks have been migrated to the new ClangTidyCheck::registerPPCallbacks method. Time to drop the old one. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D60197 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-extra/clang-tidy/ClangTidyCheck.h clang-tools-extra/clangd/ClangdUnit.cpp clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h Index: clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h =================================================================== --- clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h +++ clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h @@ -42,7 +42,6 @@ Preprocessor *PP = &Compiler.getPreprocessor(); for (auto &Check : Checks) { Check->registerMatchers(&Finder); - Check->registerPPCallbacks(Compiler); Check->registerPPCallbacks(Compiler.getSourceManager(), PP, PP); } return Finder.newASTConsumer(); Index: clang-tools-extra/clangd/ClangdUnit.cpp =================================================================== --- clang-tools-extra/clangd/ClangdUnit.cpp +++ clang-tools-extra/clangd/ClangdUnit.cpp @@ -299,7 +299,6 @@ for (const auto &Check : CTChecks) { // FIXME: the PP callbacks skip the entire preamble. // Checks that want to see #includes in the main file do not see them. - Check->registerPPCallbacks(*Clang); Check->registerPPCallbacks(Clang->getSourceManager(), PP, PP); Check->registerMatchers(&CTFinder); } Index: clang-tools-extra/clang-tidy/ClangTidyCheck.h =================================================================== --- clang-tools-extra/clang-tidy/ClangTidyCheck.h +++ clang-tools-extra/clang-tidy/ClangTidyCheck.h @@ -53,9 +53,6 @@ /// constructor using the Options.get() methods below. ClangTidyCheck(StringRef CheckName, ClangTidyContext *Context); - /// DEPRECATED: Use the other overload. - virtual void registerPPCallbacks(CompilerInstance &Compiler) {} - /// \brief Override this to register ``PPCallbacks`` in the preprocessor. /// /// This should be used for clang-tidy checks that analyze preprocessor- Index: clang-tools-extra/clang-tidy/ClangTidy.cpp =================================================================== --- clang-tools-extra/clang-tidy/ClangTidy.cpp +++ clang-tools-extra/clang-tidy/ClangTidy.cpp @@ -393,7 +393,6 @@ for (auto &Check : Checks) { Check->registerMatchers(&*Finder); - Check->registerPPCallbacks(Compiler); Check->registerPPCallbacks(*SM, PP, ModuleExpanderPP); }
Index: clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h =================================================================== --- clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h +++ clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h @@ -42,7 +42,6 @@ Preprocessor *PP = &Compiler.getPreprocessor(); for (auto &Check : Checks) { Check->registerMatchers(&Finder); - Check->registerPPCallbacks(Compiler); Check->registerPPCallbacks(Compiler.getSourceManager(), PP, PP); } return Finder.newASTConsumer(); Index: clang-tools-extra/clangd/ClangdUnit.cpp =================================================================== --- clang-tools-extra/clangd/ClangdUnit.cpp +++ clang-tools-extra/clangd/ClangdUnit.cpp @@ -299,7 +299,6 @@ for (const auto &Check : CTChecks) { // FIXME: the PP callbacks skip the entire preamble. // Checks that want to see #includes in the main file do not see them. - Check->registerPPCallbacks(*Clang); Check->registerPPCallbacks(Clang->getSourceManager(), PP, PP); Check->registerMatchers(&CTFinder); } Index: clang-tools-extra/clang-tidy/ClangTidyCheck.h =================================================================== --- clang-tools-extra/clang-tidy/ClangTidyCheck.h +++ clang-tools-extra/clang-tidy/ClangTidyCheck.h @@ -53,9 +53,6 @@ /// constructor using the Options.get() methods below. ClangTidyCheck(StringRef CheckName, ClangTidyContext *Context); - /// DEPRECATED: Use the other overload. - virtual void registerPPCallbacks(CompilerInstance &Compiler) {} - /// \brief Override this to register ``PPCallbacks`` in the preprocessor. /// /// This should be used for clang-tidy checks that analyze preprocessor- Index: clang-tools-extra/clang-tidy/ClangTidy.cpp =================================================================== --- clang-tools-extra/clang-tidy/ClangTidy.cpp +++ clang-tools-extra/clang-tidy/ClangTidy.cpp @@ -393,7 +393,6 @@ for (auto &Check : Checks) { Check->registerMatchers(&*Finder); - Check->registerPPCallbacks(Compiler); Check->registerPPCallbacks(*SM, PP, ModuleExpanderPP); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits