Merge pull request #736 from luoliwoshang/c/clang/anonymous
c/clang:anonymous record & underlying type
This commit is contained in:
@@ -53,10 +53,16 @@ void wrap_clang_getElementType(CXType *Typ, CXType *elemTyp) { *elemTyp = clang_
|
||||
|
||||
long long wrap_clang_getArraySize(CXType *arrayTyp) { return clang_getArraySize(*arrayTyp); }
|
||||
|
||||
void wrap_clang_Type_getNamedType(CXType *typ, CXType *namedTyp) { *namedTyp = clang_Type_getNamedType(*typ); }
|
||||
|
||||
void wrap_clang_getCanonicalType(CXType *typ, CXType *canonicalType) { *canonicalType = clang_getCanonicalType(*typ); }
|
||||
|
||||
CXString wrap_clang_getTypeSpelling(CXType *typ) { return clang_getTypeSpelling(*typ); }
|
||||
|
||||
void wrap_clang_getTypedefDeclUnderlyingType(CXCursor *cur, CXType *typ) {
|
||||
*typ = clang_getTypedefDeclUnderlyingType(*cur);
|
||||
}
|
||||
|
||||
CXString wrap_clang_getTokenSpelling(CXTranslationUnit unit, CXToken *token) {
|
||||
return clang_getTokenSpelling(unit, *token);
|
||||
}
|
||||
@@ -72,6 +78,12 @@ enum CX_CXXAccessSpecifier wrap_clang_getCXXAccessSpecifier(CXCursor *cursor) {
|
||||
return clang_getCXXAccessSpecifier(*cursor);
|
||||
}
|
||||
|
||||
unsigned wrap_clang_Cursor_isAnonymous(CXCursor *cursor) { return clang_Cursor_isAnonymous(*cursor); }
|
||||
|
||||
unsigned wrap_clang_Cursor_isAnonymousRecordDecl(CXCursor *cursor) {
|
||||
return clang_Cursor_isAnonymousRecordDecl(*cursor);
|
||||
}
|
||||
|
||||
CXString wrap_clang_Cursor_getRawCommentText(CXCursor *cursor) { return clang_Cursor_getRawCommentText(*cursor); }
|
||||
|
||||
void wrap_clang_getCursorExtent(CXCursor *cur, CXSourceRange *range) { *range = clang_getCursorExtent(*cur); }
|
||||
|
||||
@@ -1673,6 +1673,32 @@ func (c Cursor) Location() (loc SourceLocation) {
|
||||
return
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the given cursor represents an anonymous
|
||||
* tag or namespace
|
||||
*/
|
||||
// llgo:link (*Cursor).wrapIsAnonymous C.wrap_clang_Cursor_isAnonymous
|
||||
func (c *Cursor) wrapIsAnonymous() (ret c.Uint) {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (c Cursor) IsAnonymous() (ret c.Uint) {
|
||||
return c.wrapIsAnonymous()
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the given cursor represents an anonymous record
|
||||
* declaration.
|
||||
*/
|
||||
// llgo:link (*Cursor).wrapIsAnonymousRecordDecl C.wrap_clang_Cursor_isAnonymousRecordDecl
|
||||
func (c *Cursor) wrapIsAnonymousRecordDecl() (ret c.Uint) {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (c Cursor) IsAnonymousRecordDecl() (ret c.Uint) {
|
||||
return c.wrapIsAnonymousRecordDecl()
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the C++ access control level to a base class for a
|
||||
* cursor with kind CX_CXXBaseSpecifier.
|
||||
@@ -1837,6 +1863,20 @@ func (t Type) String() (ret String) {
|
||||
return t.wrapString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the underlying type of a typedef declaration.
|
||||
*
|
||||
* If the cursor does not reference a typedef declaration, an invalid type is
|
||||
* returned.
|
||||
*/
|
||||
// llgo:link (*Cursor).wrapTypedefDeclUnderlyingType C.wrap_clang_getTypedefDeclUnderlyingType
|
||||
func (c *Cursor) wrapTypedefDeclUnderlyingType(ret *Type) { return }
|
||||
|
||||
func (c Cursor) TypedefDeclUnderlyingType() (ret Type) {
|
||||
c.wrapTypedefDeclUnderlyingType(&ret)
|
||||
return
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the return type associated with a function type.
|
||||
*
|
||||
@@ -1928,6 +1968,19 @@ func (t Type) ArraySize() (ret c.LongLong) {
|
||||
return t.wrapArraySize()
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the type named by the qualified-id.
|
||||
*
|
||||
* If a non-elaborated type is passed in, an invalid type is returned.
|
||||
*/
|
||||
// llgo:link (*Type).wrapNamedType C.wrap_clang_Type_getNamedType
|
||||
func (t *Type) wrapNamedType(ret *Type) { return }
|
||||
|
||||
func (t Type) NamedType() (ret Type) {
|
||||
t.wrapNamedType(&ret)
|
||||
return
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the canonical type for a CXType.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user