ClangRefactoring: Improve indexing

Fix some bugs in the indexing and use the new macro indexer from clang.

Change-Id: I2ba1b28097a8751aea942071851a60d164c6f371
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2019-05-23 18:32:47 +02:00
parent b36e9d0e95
commit ee27ae2ef7
26 changed files with 393 additions and 454 deletions

View File

@@ -34,16 +34,15 @@ namespace ClangBackEnd {
bool CollectMacrosSourceFileCallbacks::handleBeginSource(clang::CompilerInstance &compilerInstance)
{
auto callbacks = std::make_unique<CollectMacrosPreprocessorCallbacks>(
m_symbolEntries,
m_sourceLocationEntries,
m_sourceFiles,
m_usedMacros,
m_fileStatuses,
m_sourceDependencies,
m_filePathCache,
compilerInstance.getSourceManager(),
compilerInstance.getPreprocessorPtr(),
m_sourcesManager);
m_symbolEntries,
m_sourceLocationEntries,
m_sourceFiles,
m_usedMacros,
m_fileStatuses,
m_sourceDependencies,
m_filePathCache,
compilerInstance.getSourceManager(),
compilerInstance.getPreprocessorPtr());
compilerInstance.getPreprocessorPtr()->addPPCallbacks(std::move(callbacks));