diff --git a/c/clang/_wrap/cursor.cpp b/c/clang/_wrap/cursor.cpp index 378c0a09..a97f901e 100644 --- a/c/clang/_wrap/cursor.cpp +++ b/c/clang/_wrap/cursor.cpp @@ -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) { diff --git a/c/clang/clang.go b/c/clang/clang.go index 69a550bd..2bbf5700 100644 --- a/c/clang/clang.go +++ b/c/clang/clang.go @@ -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. *