c/clang:array size & raw comment

This commit is contained in:
luoliwoshang
2024-08-14 18:30:17 +08:00
parent 9f1100b967
commit 7033f11d56
2 changed files with 29 additions and 0 deletions

View File

@@ -49,6 +49,8 @@ void wrap_clang_getArrayElementType(CXType *arrayTyp, CXType *elemTyp) {
*elemTyp = clang_getArrayElementType(*arrayTyp);
}
long long wrap_clang_getArraySize(CXType *arrayTyp) { return clang_getArraySize(*arrayTyp); }
void wrap_clang_getCanonicalType(CXType *typ, CXType *canonicalType) { *canonicalType = clang_getCanonicalType(*typ); }
CXString wrap_clang_getTypeSpelling(CXType *typ) { return clang_getTypeSpelling(*typ); }
@@ -68,6 +70,8 @@ enum CX_CXXAccessSpecifier wrap_clang_getCXXAccessSpecifier(CXCursor *cursor) {
return clang_getCXXAccessSpecifier(*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); }
void wrap_clang_tokenize(CXTranslationUnit unit, CXSourceRange *Range, CXToken **Tokens, unsigned *NumTokens) {

View File

@@ -1702,6 +1702,19 @@ func (c Cursor) CXXAccessSpecifier() CXXAccessSpecifier {
return c.wrapCXXAccessSpecifier()
}
/**
* Given a cursor that represents a declaration, return the associated
* comment text, including comment markers.
*/
// llgo:link (*Cursor).wrapRawCommentText C.wrap_clang_Cursor_getRawCommentText
func (c *Cursor) wrapRawCommentText() (ret String) {
return
}
func (c Cursor) RawCommentText() (ret String) {
return c.wrapRawCommentText()
}
/**
* Retrieve the physical extent of the source construct referenced by
* the given cursor.
@@ -1869,6 +1882,18 @@ func (t Type) ArrayElementType() (ret Type) {
return
}
/**
* Return the array size of a constant array.
*
* If a non-array type is passed in, -1 is returned.
*/
// llgo:link (*Type).wrapArraySize C.wrap_clang_getArraySize
func (t *Type) wrapArraySize() (ret c.LongLong) { return 0 }
func (t Type) ArraySize() (ret c.LongLong) {
return t.wrapArraySize()
}
/**
* Return the canonical type for a CXType.
*