c/clang:element type

This commit is contained in:
luoliwoshang
2024-08-19 18:07:36 +08:00
parent 876aea39e5
commit a353514fc8
2 changed files with 16 additions and 0 deletions

View File

@@ -1894,6 +1894,20 @@ func (t Type) ArrayElementType() (ret Type) {
return
}
/**
* Return the element type of an array, complex, or vector type.
*
* If a type is passed in that is not an array, complex, or vector type,
* an invalid type is returned.
*/
// llgo:link (*Type).wrapElementType C.wrap_clang_getElementType
func (t *Type) wrapElementType(ret *Type) { return }
func (t Type) ElementType() (ret Type) {
t.wrapElementType(&ret)
return
}
/**
* Return the array size of a constant array.
*