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

@@ -27,23 +27,12 @@
#include "sourcelocations.h"
#include "class.h"
#include "enum.h"
#include "function.h"
#include "include.h"
#include "symbol.h"
#include <cpptools/usages.h>
namespace ClangRefactoring {
enum class SymbolType
{
Class = 0,
Enum = 1,
Include = 2
};
class SymbolQueryInterface
{
public:
@@ -57,9 +46,10 @@ public:
virtual CppTools::Usages sourceUsagesAt(ClangBackEnd::FilePathId filePathId,
int line,
int utf8Column) const = 0;
virtual Symbols symbolsContaining(SymbolType symbolType,
Utils::SmallStringView regularExpression) const = 0;
virtual Functions functionsContaining(Utils::SmallStringView regularExpression) const = 0;
virtual Symbols symbols(const ClangBackEnd::SymbolKinds &symbolKinds,
Utils::SmallStringView searchTerm) const = 0;
virtual Utils::optional<SourceLocation> locationForSymbolId(SymbolId symbolId,
ClangBackEnd::SourceLocationKind kind) const = 0;
protected:
~SymbolQueryInterface() = default;