From 6a5975fe13c666a59db006c5e79555b194d787da Mon Sep 17 00:00:00 2001 From: malte_langkabel Date: Mon, 25 Jan 2016 17:13:22 +0100 Subject: [PATCH] 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. --- src/lib_parser/data/parser/cxx/PreprocessorCallbacks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib_parser/data/parser/cxx/PreprocessorCallbacks.cpp b/src/lib_parser/data/parser/cxx/PreprocessorCallbacks.cpp index 6a622db7..2db4e964 100644 --- a/src/lib_parser/data/parser/cxx/PreprocessorCallbacks.cpp +++ b/src/lib_parser/data/parser/cxx/PreprocessorCallbacks.cpp @@ -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) &&