Clang: Locator filter for the symbol database

There are no symbol queries for the locator filters. The signature
generation is still not implemented but for simple cases it should work.

Change-Id: Ic6b04fbe1e7e057892f194ac139615c47d6ec33f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-04-09 13:30:30 +02:00
parent 18de1e3fcf
commit 4b0bcbdcb6
57 changed files with 649 additions and 1118 deletions

View File

@@ -31,15 +31,32 @@
namespace ClangRefactoring {
// Use proper name
using SymbolString = Utils::PathString;
using SymbolString = Utils::BasicSmallString<63>;
using SignatureString = Utils::BasicSmallString<126>;
using SymbolId = long long;
struct Symbol
{
Symbol() = default;
Symbol(SymbolId symbolId, Utils::SmallStringView name)
: name(name), symbolId(symbolId)
{}
Symbol(SymbolId symbolId, Utils::SmallStringView name, Utils::SmallStringView signature)
: signature(signature), name(name), symbolId(symbolId)
{}
SignatureString signature;
SymbolString name;
ClangBackEnd::FilePath path;
Utils::LineColumn lineColumn;
SymbolId symbolId;
friend
bool operator==(const Symbol &first, const Symbol &second)
{
return first.symbolId == second.symbolId
&& first.name == second.name
&& first.signature == second.signature;
}
};
using Symbols = std::vector<Symbol>;
} // namespace ClangRefactoring