c/clang:noref type
This commit is contained in:
@@ -45,6 +45,8 @@ void wrap_clang_getPointeeType(CXType *pointerTyp, CXType *pointeeTyp) {
|
|||||||
*pointeeTyp = clang_getPointeeType(*pointerTyp);
|
*pointeeTyp = clang_getPointeeType(*pointerTyp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wrap_clang_getNonReferenceType(CXType *typ, CXType *nonRefTyp) { *nonRefTyp = clang_getNonReferenceType(*typ); }
|
||||||
|
|
||||||
void wrap_clang_getArrayElementType(CXType *arrayTyp, CXType *elemTyp) {
|
void wrap_clang_getArrayElementType(CXType *arrayTyp, CXType *elemTyp) {
|
||||||
*elemTyp = clang_getArrayElementType(*arrayTyp);
|
*elemTyp = clang_getArrayElementType(*arrayTyp);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1942,6 +1942,23 @@ func (t Type) ArrayElementType() (ret Type) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For reference types (e.g., "const int&"), returns the type that the
|
||||||
|
* reference refers to (e.g "const int").
|
||||||
|
*
|
||||||
|
* Otherwise, returns the type itself.
|
||||||
|
*
|
||||||
|
* A type that has kind \c CXType_LValueReference or
|
||||||
|
* \c CXType_RValueReference is a reference type.
|
||||||
|
*/
|
||||||
|
// llgo:link (*Type).wrapNonReferenceType C.wrap_clang_getNonReferenceType
|
||||||
|
func (t *Type) wrapNonReferenceType(ret *Type) { return }
|
||||||
|
|
||||||
|
func (t Type) NonReferenceType() (ret Type) {
|
||||||
|
t.wrapNonReferenceType(&ret)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the element type of an array, complex, or vector type.
|
* Return the element type of an array, complex, or vector type.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user