c/clang:noref type

This commit is contained in:
luoliwoshang
2024-08-22 12:18:38 +08:00
parent 3c282e8cf9
commit 33cdb7a541
2 changed files with 19 additions and 0 deletions

View File

@@ -1942,6 +1942,23 @@ func (t Type) ArrayElementType() (ret Type) {
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.
*