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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user