mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-08 01:04:54 +00:00
Support some unhandled Decl::Kind
This commit is contained in:
parent
2fc2d1b16c
commit
4b973a86a2
@ -193,6 +193,10 @@ Kind GetKind(const Decl *D, SymbolKind &kind) {
|
|||||||
case Decl::CXXDestructor:
|
case Decl::CXXDestructor:
|
||||||
kind = SymbolKind::Method;
|
kind = SymbolKind::Method;
|
||||||
return Kind::Func;
|
return Kind::Func;
|
||||||
|
case Decl::NonTypeTemplateParm:
|
||||||
|
// ccls extension
|
||||||
|
kind = SymbolKind::Parameter;
|
||||||
|
return Kind::Var;
|
||||||
case Decl::Var:
|
case Decl::Var:
|
||||||
case Decl::Decomposition:
|
case Decl::Decomposition:
|
||||||
kind = SymbolKind::Variable;
|
kind = SymbolKind::Variable;
|
||||||
@ -824,7 +828,7 @@ public:
|
|||||||
if (D->getKind() == Decl::TemplateTypeParm)
|
if (D->getKind() == Decl::TemplateTypeParm)
|
||||||
type->def.detailed_name = Intern(info->short_name);
|
type->def.detailed_name = Intern(info->short_name);
|
||||||
else
|
else
|
||||||
SetName(D, info->short_name, info->qualified, type->def);
|
SetName(OrigD, info->short_name, info->qualified, type->def);
|
||||||
}
|
}
|
||||||
if (is_def || is_decl) {
|
if (is_def || is_decl) {
|
||||||
const Decl *DC = cast<Decl>(SemDC);
|
const Decl *DC = cast<Decl>(SemDC);
|
||||||
|
@ -272,6 +272,9 @@ CompletionItemKind GetCompletionKind(CodeCompletionContext::Kind K,
|
|||||||
case Decl::TypeAlias:
|
case Decl::TypeAlias:
|
||||||
case Decl::Typedef:
|
case Decl::Typedef:
|
||||||
return CompletionItemKind::TypeParameter;
|
return CompletionItemKind::TypeParameter;
|
||||||
|
case Decl::Using:
|
||||||
|
case Decl::ConstructorUsingShadow:
|
||||||
|
return CompletionItemKind::Keyword;
|
||||||
case Decl::Binding:
|
case Decl::Binding:
|
||||||
return CompletionItemKind::Variable;
|
return CompletionItemKind::Variable;
|
||||||
case Decl::Field:
|
case Decl::Field:
|
||||||
|
Loading…
Reference in New Issue
Block a user