mirror of
				https://github.com/MaskRay/ccls.git
				synced 2025-10-31 20:53:01 +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