mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 09:05:10 +00:00
indexer: set the kind of static data members to Field instead of Var
Otherwise it is impossible to distinguish a static variable from a static member variable. Close #593
This commit is contained in:
parent
de800ebb70
commit
c5acf62060
@ -196,7 +196,14 @@ Kind getKind(const Decl *d, SymbolKind &kind) {
|
||||
// ccls extension
|
||||
kind = SymbolKind::Parameter;
|
||||
return Kind::Var;
|
||||
case Decl::Var:
|
||||
case Decl::Var: {
|
||||
auto vd = cast<VarDecl>(d);
|
||||
if (vd->isStaticDataMember()) {
|
||||
kind = SymbolKind::Field;
|
||||
return Kind::Var;
|
||||
}
|
||||
[[fallthrough]];
|
||||
}
|
||||
case Decl::Decomposition:
|
||||
kind = SymbolKind::Variable;
|
||||
return Kind::Var;
|
||||
|
Loading…
Reference in New Issue
Block a user