diff options
author | Alexander Kornienko <alexfh@google.com> | 2019-03-22 18:16:51 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2019-03-22 18:16:51 +0000 |
commit | 5e381fb11a01e81a0084338d4a7b35b5180d6f0c (patch) | |
tree | f9811b72f68239a2f0af718c21f8113c7677be8c | |
parent | aea9db9d40abcb46e350294409a53dfb7953cb23 (diff) | |
download | bcm5719-llvm-5e381fb11a01e81a0084338d4a7b35b5180d6f0c.tar.gz bcm5719-llvm-5e381fb11a01e81a0084338d4a7b35b5180d6f0c.zip |
[clangd] Call the new ClangTidyCheck::registerPPCallbacks overload
llvm-svn: 356788
-rw-r--r-- | clang-tools-extra/clangd/ClangdUnit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/ClangdUnit.cpp b/clang-tools-extra/clangd/ClangdUnit.cpp index 71d7bc1a9fc..6bc9551abfd 100644 --- a/clang-tools-extra/clangd/ClangdUnit.cpp +++ b/clang-tools-extra/clangd/ClangdUnit.cpp @@ -295,10 +295,12 @@ ParsedAST::build(std::unique_ptr<CompilerInvocation> CI, CTContext->setASTContext(&Clang->getASTContext()); CTContext->setCurrentFile(MainInput.getFile()); CTFactories.createChecks(CTContext.getPointer(), CTChecks); + Preprocessor *PP = &Clang->getPreprocessor(); 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); } } |