Clang: Add locator specific methods to SymbolQuery

... and implement LocatorFilter using these methods.

Change-Id: Ie3e3ebb3a547e2b2bda49e76a199a3ccd8fe6403
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2017-11-24 16:03:07 +01:00
parent 92cdfc0c2a
commit 88c3e27722
22 changed files with 580 additions and 25 deletions

View File

@@ -47,7 +47,9 @@ public:
: m_statementFactory(statementFactory)
{}
SourceLocations locationsAt(ClangBackEnd::FilePathId filePathId, int line, int utf8Column) const override
SourceLocations locationsAt(ClangBackEnd::FilePathId filePathId,
int line,
int utf8Column) const override
{
ReadStatement &locationsStatement = m_statementFactory.selectLocationsForSymbolLocation;
@@ -59,7 +61,9 @@ public:
utf8Column);
}
CppTools::Usages sourceUsagesAt(ClangBackEnd::FilePathId filePathId, int line, int utf8Column) const override
CppTools::Usages sourceUsagesAt(ClangBackEnd::FilePathId filePathId,
int line,
int utf8Column) const override
{
ReadStatement &locationsStatement = m_statementFactory.selectSourceUsagesForSymbolLocation;
@@ -71,6 +75,19 @@ public:
utf8Column);
}
Symbols symbolsContaining(SymbolType symbolType,
Utils::SmallStringView/*regularExpression*/) const override
{
// TODO: implement
return Classes();
}
Functions functionsContaining(Utils::SmallStringView/*regularExpression*/) const override
{
// TODO: implement
return Functions();
}
private:
StatementFactory &m_statementFactory;
};