data: fixed storing of non-canonical includes

* Include paths are converted to a canonical version before they are tested for being in the project files. Therefore non-canonical include edges will be stored by Coati as well.
This commit is contained in:
malte_langkabel
2016-01-25 17:13:22 +01:00
parent eb12d3cda1
commit 6a5975fe13
@@ -52,8 +52,8 @@ void PreprocessorCallbacks::InclusionDirective(
const clang::FileEntry* baseFileEntry = m_sourceManager.getFileEntryForID(m_sourceManager.getFileID(hashLocation));
if (fileEntry && baseFileEntry)
{
std::string baseFilePath = baseFileEntry->getName();
std::string includedFilePath = fileEntry->getName();
FilePath baseFilePath = FilePath(baseFileEntry->getName()).canonical();
FilePath includedFilePath = FilePath(fileEntry->getName()).canonical();
const FileManager* fileManager = m_fileRegister->getFileManager();
if (fileManager->hasFilePath(baseFilePath) && fileManager->hasFilePath(includedFilePath) &&