Merge pull request #729 from luoliwoshang/c/clang/elementtype
c/clang:element type
This commit is contained in:
@@ -49,6 +49,8 @@ void wrap_clang_getArrayElementType(CXType *arrayTyp, CXType *elemTyp) {
|
||||
*elemTyp = clang_getArrayElementType(*arrayTyp);
|
||||
}
|
||||
|
||||
void wrap_clang_getElementType(CXType *Typ, CXType *elemTyp) { *elemTyp = clang_getElementType(*Typ); }
|
||||
|
||||
long long wrap_clang_getArraySize(CXType *arrayTyp) { return clang_getArraySize(*arrayTyp); }
|
||||
|
||||
void wrap_clang_getCanonicalType(CXType *typ, CXType *canonicalType) { *canonicalType = clang_getCanonicalType(*typ); }
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user