logic: improved c++ indexer coverage

* revised check for visiting a referenced type or decl
* calling client->onFileParsed everytime a file gets processed by the Preprocessor so we can create valid locations in that file
* created test for detecting a usage of a member inside a CallExpression context
* added method to consume a context based reference kind in the AstVisitor
This commit is contained in:
malte_langkabel
2016-11-10 16:39:52 +01:00
parent cf8e8c7655
commit 9aed97eee2
7 changed files with 108 additions and 33 deletions
@@ -29,16 +29,20 @@ void PreprocessorCallbacks::FileChanged(
filePath = FilePath(fileEntry->getName()).canonical();
}
if (!filePath.empty() && m_fileRegister->hasFilePath(filePath) && !m_fileRegister->fileIsParsed(filePath))
const bool fileIsInProject = m_fileRegister->hasFilePath(filePath);
if (!filePath.empty() && fileIsInProject)
{
m_currentPath = filePath;
m_client->onFileParsed(m_fileRegister->getFileInfo(filePath));
if (reason == EnterFile && !m_fileRegister->includeFileIsParsed(filePath))
{
m_client->onFileParsed(m_fileRegister->getFileInfo(filePath));
m_fileRegister->markIncludeFileParsing(filePath);
}
}
if (!filePath.empty() && fileIsInProject && !m_fileRegister->fileIsParsed(filePath))
{
m_currentPath = filePath;
}
else
{
m_currentPath = FilePath();