forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user