logic: skip recording macro usages in non-indexed files

This commit is contained in:
mlangkabel
2017-11-03 16:20:31 +01:00
parent 8baf8cd49b
commit 09694409f1
59 changed files with 255050 additions and 1102 deletions
@@ -53,16 +53,26 @@ public:
) override;
private:
struct FileIdHash
{
size_t operator()(clang::FileID fileID) const
{
return fileID.getHashValue();
}
};
void onMacroUsage(const clang::Token& macroNameToken);
ParseLocation getParseLocation(const clang::Token& macroNameToc) const;
ParseLocation getParseLocation(const clang::MacroInfo* macroNameToc) const;
ParseLocation getParseLocation(const clang::SourceRange& sourceRange) const;
bool isLocatedInProjectFile(const clang::SourceLocation loc);
const clang::SourceManager& m_sourceManager;
std::shared_ptr<ParserClient> m_client;
std::shared_ptr<FileRegister> m_fileRegister;
std::shared_ptr<FilePathCache> m_canonicalFilePathCache;
std::unordered_map<const clang::FileID, bool, FileIdHash> m_inProjectFileMap;
FilePath m_currentPath;
};