ClangRefactoring: Improve follow symbol and usage

Change-Id: Idb42010443e4560489ef067e54d05b4e567598e9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2019-08-22 16:10:38 +02:00
parent c174eb378a
commit 9f805b7e8a
19 changed files with 324 additions and 53 deletions

View File

@@ -75,6 +75,36 @@ public:
utf8Column);
}
CppTools::Usages sourceUsagesAtByLocationKind(ClangBackEnd::FilePathId filePathId,
int line,
int utf8Column,
ClangBackEnd::SourceLocationKind kind) const override
{
ReadStatement &locationsStatement = m_statementFactory.selectSourceUsagesByLocationKindForSymbolLocation;
const std::size_t reserveSize = 128;
return locationsStatement.template values<CppTools::Usage, 3>(reserveSize,
filePathId.filePathId,
line,
utf8Column,
int(kind));
}
CppTools::Usages declarationsAt(ClangBackEnd::FilePathId filePathId,
int line,
int utf8Column) const override
{
ReadStatement &locationsStatement = m_statementFactory.selectSourceUsagesOrderedForSymbolLocation;
const std::size_t reserveSize = 128;
return locationsStatement.template values<CppTools::Usage, 3>(reserveSize,
filePathId.filePathId,
line,
utf8Column);
}
Symbols symbolsWithOneSymbolKinds(ClangBackEnd::SymbolKind symbolKind,
Utils::SmallStringView searchTerm) const
{