logic: indexer and name resolving fixes
* made header and excluded filepaths of filemanager canonical * implemented solving Attributed- and InjectedClassNameType * handled clang returning null objects in NameResolvers
This commit is contained in:
@@ -27,8 +27,8 @@ void FileManager::setPaths(
|
||||
std::vector<std::string> sourceExtensions
|
||||
){
|
||||
m_sourcePaths = sourcePaths;
|
||||
m_headerPaths = headerPaths;
|
||||
m_excludePaths = excludePaths;
|
||||
m_headerPaths = makeCanonical(headerPaths);
|
||||
m_excludePaths = makeCanonical(excludePaths);
|
||||
m_sourceExtensions = sourceExtensions;
|
||||
}
|
||||
|
||||
@@ -159,6 +159,16 @@ const FileInfo FileManager::getFileInfo(const FilePath& filePath) const
|
||||
return it->second;
|
||||
}
|
||||
|
||||
std::vector<FilePath> FileManager::makeCanonical(const std::vector<FilePath>& filePaths)
|
||||
{
|
||||
std::vector<FilePath> ret;
|
||||
for (const FilePath filePath: filePaths)
|
||||
{
|
||||
ret.push_back(filePath.canonical());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool FileManager::isExcluded(const FilePath& filePath) const
|
||||
{
|
||||
for (FilePath path : m_excludePaths)
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
virtual const FileInfo getFileInfo(const FilePath& filePath) const;
|
||||
|
||||
private:
|
||||
std::vector<FilePath> makeCanonical(const std::vector<FilePath>& filePaths);
|
||||
bool isExcluded(const FilePath& filePath) const;
|
||||
|
||||
std::map<FilePath, FileInfo> m_files;
|
||||
|
||||
Reference in New Issue
Block a user