We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aea9db9 commit 5e381fbCopy full SHA for 5e381fb
clang-tools-extra/clangd/ClangdUnit.cpp
@@ -295,10 +295,12 @@ ParsedAST::build(std::unique_ptr<CompilerInvocation> CI,
295
CTContext->setASTContext(&Clang->getASTContext());
296
CTContext->setCurrentFile(MainInput.getFile());
297
CTFactories.createChecks(CTContext.getPointer(), CTChecks);
298
+ Preprocessor *PP = &Clang->getPreprocessor();
299
for (const auto &Check : CTChecks) {
300
// FIXME: the PP callbacks skip the entire preamble.
301
// Checks that want to see #includes in the main file do not see them.
302
Check->registerPPCallbacks(*Clang);
303
+ Check->registerPPCallbacks(Clang->getSourceManager(), PP, PP);
304
Check->registerMatchers(&CTFinder);
305
}
306
0 commit comments