mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-21 07:59:27 +00:00
Better $cquery/vars
This commit is contained in:
parent
bf7ffb3c9d
commit
e4d4c7b139
@ -56,17 +56,30 @@ ClangType ClangType::get_canonical() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClangType ClangType::strip_qualifiers() const {
|
ClangType ClangType::strip_qualifiers() const {
|
||||||
// CXRefQualifierKind qualifiers = clang_Type_getCXXRefQualifier(cx_type)
|
CXType cx = cx_type;
|
||||||
switch (cx_type.kind) {
|
while (1) {
|
||||||
|
switch (cx.kind) {
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
case CXType_ConstantArray:
|
||||||
|
case CXType_DependentSizedArray:
|
||||||
|
case CXType_IncompleteArray:
|
||||||
|
case CXType_VariableArray:
|
||||||
|
cx = clang_getElementType(cx);
|
||||||
|
continue;
|
||||||
|
case CXType_BlockPointer:
|
||||||
case CXType_LValueReference:
|
case CXType_LValueReference:
|
||||||
|
case CXType_MemberPointer:
|
||||||
|
case CXType_ObjCObjectPointer:
|
||||||
case CXType_Pointer:
|
case CXType_Pointer:
|
||||||
case CXType_RValueReference:
|
case CXType_RValueReference:
|
||||||
return clang_getPointeeType(cx_type);
|
cx = clang_getPointeeType(cx);
|
||||||
default:
|
continue;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return cx_type;
|
return cx;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ClangType::get_spelling() const {
|
std::string ClangType::get_spelling() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user