Clang: Use the clang indexer for indexing

It is not removing so much code but will makes somethings easier in the
future. We added the SymbolType::Definition too.

Change-Id: I4e106b8518e6bfed0c6a4aa6be61c4a5fe5f8bef
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-03-22 13:57:03 +01:00
parent 41a12410e6
commit 576eb3370c
11 changed files with 247 additions and 190 deletions

View File

@@ -55,7 +55,7 @@ public:
FilePathCachingInterface &filePathCache,
const clang::SourceManager &sourceManager,
std::shared_ptr<clang::Preprocessor> &&preprocessor)
: SymbolsVisitorBase(filePathCache, sourceManager),
: SymbolsVisitorBase(filePathCache, &sourceManager),
m_preprocessor(std::move(preprocessor)),
m_sourceDependencies(sourceDependencies),
m_symbolEntries(symbolEntries),
@@ -73,8 +73,8 @@ public:
{
if (reason == clang::PPCallbacks::EnterFile)
{
const clang::FileEntry *fileEntry = m_sourceManager.getFileEntryForID(
m_sourceManager.getFileID(sourceLocation));
const clang::FileEntry *fileEntry = m_sourceManager->getFileEntryForID(
m_sourceManager->getFileID(sourceLocation));
if (fileEntry) {
addFileStatus(fileEntry);
addSourceFile(fileEntry);