[clang-tidy] Remove the old ClangTidyCheck::registerPPCallbacks method
authorAlexander Kornienko <alexfh@google.com>
Wed, 3 Apr 2019 14:03:43 +0000 (14:03 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 3 Apr 2019 14:03:43 +0000 (14:03 +0000)
Summary:
All in-tree clang-tidy checks have been migrated to the new
ClangTidyCheck::registerPPCallbacks method. Time to drop the old one.

Reviewers: sammccall, hokein

Reviewed By: hokein

Subscribers: xazax.hun, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D60197

llvm-svn: 357582

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 c8a07e6..6af8863 100644 (file)
@@ -393,7 +393,6 @@ ClangTidyASTConsumerFactory::CreateASTConsumer(
 
   for (auto &Check : Checks) {
     Check->registerMatchers(&*Finder);
-    Check->registerPPCallbacks(Compiler);
     Check->registerPPCallbacks(*SM, PP, ModuleExpanderPP);
   }
 
index db1b270..fcfea90 100644 (file)
@@ -53,9 +53,6 @@ public:
   /// 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 6bc9551..24f5ca4 100644 (file)
@@ -299,7 +299,6 @@ ParsedAST::build(std::unique_ptr<CompilerInvocation> CI,
     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 25409d4..33139d7 100644 (file)
@@ -42,7 +42,6 @@ private:
     Preprocessor *PP = &Compiler.getPreprocessor();
     for (auto &Check : Checks) {
       Check->registerMatchers(&Finder);
-      Check->registerPPCallbacks(Compiler);
       Check->registerPPCallbacks(Compiler.getSourceManager(), PP, PP);
     }
     return Finder.newASTConsumer();