castdump:array,typedef,pointer & builtin type

This commit is contained in:
luoliwoshang
2024-08-07 14:30:36 +08:00
parent 2ebb929e2c
commit 9cb73fbf78
3 changed files with 101 additions and 12 deletions

View File

@@ -1321,6 +1321,14 @@ type Cursor struct {
type TypeKind c.Int
/**
* Retrieve the spelling of a given CXTypeKind.
*/
// llgo:link TypeKind.String C.clang_getTypeKindSpelling
func (TypeKind) String() (ret String) {
return
}
/**
* Describes the kind of type
*/
@@ -1780,6 +1788,44 @@ func (t Type) String() (ret String) {
return t.wrapString()
}
/**
* For pointer types, returns the type of the pointee.
*/
// llgo:link (*Type).wrapPointeeType C.wrap_clang_getPointeeType
func (t *Type) wrapPointeeType(ret *Type) { return }
func (t Type) PointeeType() (ret Type) {
t.wrapPointeeType(&ret)
return
}
/**
* Return the element type of an array type.
*
* If a non-array type is passed in, an invalid type is returned.
*/
// llgo:link (*Type).wrapArrayElementType C.wrap_clang_getArrayElementType
func (t *Type) wrapArrayElementType(ret *Type) { return }
func (t Type) ArrayElementType() (ret Type) {
t.wrapArrayElementType(&ret)
return
}
/**
* Return the canonical type for a CXType.
*
* Clang's type system explicitly models typedefs and all the ways
* a specific type can be represented. The canonical type is the underlying
* type with all the "sugar" removed. For example, if 'T' is a typedef
* for 'int', the canonical type for 'T' would be 'int'.
*/
// llgo:link (*Type).wrapCanonicalType C.wrap_clang_getCanonicalType
func (t *Type) wrapCanonicalType(ret *Type) { return }
func (t Type) CanonicalType() (ret Type) {
t.wrapCanonicalType(&ret)
return
}
//llgo:link File.FileName C.clang_getFileName
func (File) FileName() (ret String) { return }