mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 03:25:54 -04:00
[clangd] Call the new ClangTidyCheck::registerPPCallbacks overload
llvm-svn: 356788
This commit is contained in:
parent
aea9db9d40
commit
5e381fb11a
@ -295,10 +295,12 @@ ParsedAST::build(std::unique_ptr<CompilerInvocation> CI,
|
|||||||
CTContext->setASTContext(&Clang->getASTContext());
|
CTContext->setASTContext(&Clang->getASTContext());
|
||||||
CTContext->setCurrentFile(MainInput.getFile());
|
CTContext->setCurrentFile(MainInput.getFile());
|
||||||
CTFactories.createChecks(CTContext.getPointer(), CTChecks);
|
CTFactories.createChecks(CTContext.getPointer(), CTChecks);
|
||||||
|
Preprocessor *PP = &Clang->getPreprocessor();
|
||||||
for (const auto &Check : CTChecks) {
|
for (const auto &Check : CTChecks) {
|
||||||
// FIXME: the PP callbacks skip the entire preamble.
|
// FIXME: the PP callbacks skip the entire preamble.
|
||||||
// Checks that want to see #includes in the main file do not see them.
|
// Checks that want to see #includes in the main file do not see them.
|
||||||
Check->registerPPCallbacks(*Clang);
|
Check->registerPPCallbacks(*Clang);
|
||||||
|
Check->registerPPCallbacks(Clang->getSourceManager(), PP, PP);
|
||||||
Check->registerMatchers(&CTFinder);
|
Check->registerMatchers(&CTFinder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user