Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cl/func.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ func compileFuncOrMethod(ctx *pkgCtx, obj *funcObj, this *classCtx) {
var typName, typCName string
var nameInPkg string
if this == nil {
// TODO(xsw): llgo bugfix - to support method with callback
if ctx.lang == LanguageC && feats&featHasCallback == 0 {
if ctx.lang == LanguageC {
// try to method for C global functions
params, recv, typRecv, typName = tryToMethod(ctx, pkgTypes, params)
if typRecv != nil {
Expand Down Expand Up @@ -189,7 +188,7 @@ func existMember(typ *types.Named, name string) bool {
}

const (
llgoSupportAliasAsRecv = false
llgoSupportAliasAsRecv = true
Comment thread
xushiwei marked this conversation as resolved.
c2goMethodRecvName = "self"
)

Expand Down
32 changes: 16 additions & 16 deletions tool/_testc/clang-c-22.1.8/BuildSystem.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions tool/_testc/clang-c-22.1.8/BuildSystem/out.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func VirtualFileOverlayCreate(options c.Uint) VirtualFileOverlay
// The virtual path must be canonicalized (not contain "."/"..").
// \returns 0 for success, non-zero to indicate an error.
//
// llgo:link (*VirtualFileOverlayImpl).AddFileMapping C.clang_VirtualFileOverlay_addFileMapping
func (_llcppg_param1 *VirtualFileOverlayImpl) AddFileMapping(virtualPath *c.Char, realPath *c.Char) CXErrorCode.ErrorCode {
// llgo:link VirtualFileOverlay.AddFileMapping C.clang_VirtualFileOverlay_addFileMapping
func (_llcppg_param1 VirtualFileOverlay) AddFileMapping(virtualPath *c.Char, realPath *c.Char) CXErrorCode.ErrorCode {
return 0
}

Expand All @@ -48,8 +48,8 @@ func (_llcppg_param1 *VirtualFileOverlayImpl) AddFileMapping(virtualPath *c.Char
// option can be used to override the default.
// \returns 0 for success, non-zero to indicate an error.
//
// llgo:link (*VirtualFileOverlayImpl).SetCaseSensitivity C.clang_VirtualFileOverlay_setCaseSensitivity
func (_llcppg_param1 *VirtualFileOverlayImpl) SetCaseSensitivity(caseSensitive c.Int) CXErrorCode.ErrorCode {
// llgo:link VirtualFileOverlay.SetCaseSensitivity C.clang_VirtualFileOverlay_setCaseSensitivity
func (_llcppg_param1 VirtualFileOverlay) SetCaseSensitivity(caseSensitive c.Int) CXErrorCode.ErrorCode {
return 0
}

Expand All @@ -61,8 +61,8 @@ func (_llcppg_param1 *VirtualFileOverlayImpl) SetCaseSensitivity(caseSensitive c
// \param out_buffer_size pointer to receive the buffer size.
// \returns 0 for success, non-zero to indicate an error.
//
// llgo:link (*VirtualFileOverlayImpl).WriteToBuffer C.clang_VirtualFileOverlay_writeToBuffer
func (_llcppg_param1 *VirtualFileOverlayImpl) WriteToBuffer(options c.Uint, out_buffer_ptr **c.Char, out_buffer_size *c.Uint) CXErrorCode.ErrorCode {
// llgo:link VirtualFileOverlay.WriteToBuffer C.clang_VirtualFileOverlay_writeToBuffer
func (_llcppg_param1 VirtualFileOverlay) WriteToBuffer(options c.Uint, out_buffer_ptr **c.Char, out_buffer_size *c.Uint) CXErrorCode.ErrorCode {
return 0
}

Expand All @@ -76,8 +76,8 @@ func Free(buffer unsafe.Pointer)

// Dispose a \c CXVirtualFileOverlay object.
//
// llgo:link (*VirtualFileOverlayImpl).Dispose C.clang_VirtualFileOverlay_dispose
func (_llcppg_param1 *VirtualFileOverlayImpl) Dispose() {
// llgo:link VirtualFileOverlay.Dispose C.clang_VirtualFileOverlay_dispose
func (_llcppg_param1 VirtualFileOverlay) Dispose() {
}

// Create a \c CXModuleMapDescriptor object.
Expand All @@ -91,16 +91,16 @@ func ModuleMapDescriptorCreate(options c.Uint) ModuleMapDescriptor
// Sets the framework module name that the module.modulemap describes.
// \returns 0 for success, non-zero to indicate an error.
//
// llgo:link (*ModuleMapDescriptorImpl).SetFrameworkModuleName C.clang_ModuleMapDescriptor_setFrameworkModuleName
func (_llcppg_param1 *ModuleMapDescriptorImpl) SetFrameworkModuleName(name *c.Char) CXErrorCode.ErrorCode {
// llgo:link ModuleMapDescriptor.SetFrameworkModuleName C.clang_ModuleMapDescriptor_setFrameworkModuleName
func (_llcppg_param1 ModuleMapDescriptor) SetFrameworkModuleName(name *c.Char) CXErrorCode.ErrorCode {
return 0
}

// Sets the umbrella header name that the module.modulemap describes.
// \returns 0 for success, non-zero to indicate an error.
//
// llgo:link (*ModuleMapDescriptorImpl).SetUmbrellaHeader C.clang_ModuleMapDescriptor_setUmbrellaHeader
func (_llcppg_param1 *ModuleMapDescriptorImpl) SetUmbrellaHeader(name *c.Char) CXErrorCode.ErrorCode {
// llgo:link ModuleMapDescriptor.SetUmbrellaHeader C.clang_ModuleMapDescriptor_setUmbrellaHeader
func (_llcppg_param1 ModuleMapDescriptor) SetUmbrellaHeader(name *c.Char) CXErrorCode.ErrorCode {
return 0
}

Expand All @@ -112,13 +112,13 @@ func (_llcppg_param1 *ModuleMapDescriptorImpl) SetUmbrellaHeader(name *c.Char) C
// \param out_buffer_size pointer to receive the buffer size.
// \returns 0 for success, non-zero to indicate an error.
//
// llgo:link (*ModuleMapDescriptorImpl).WriteToBuffer C.clang_ModuleMapDescriptor_writeToBuffer
func (_llcppg_param1 *ModuleMapDescriptorImpl) WriteToBuffer(options c.Uint, out_buffer_ptr **c.Char, out_buffer_size *c.Uint) CXErrorCode.ErrorCode {
// llgo:link ModuleMapDescriptor.WriteToBuffer C.clang_ModuleMapDescriptor_writeToBuffer
func (_llcppg_param1 ModuleMapDescriptor) WriteToBuffer(options c.Uint, out_buffer_ptr **c.Char, out_buffer_size *c.Uint) CXErrorCode.ErrorCode {
return 0
}

// Dispose a \c CXModuleMapDescriptor object.
//
// llgo:link (*ModuleMapDescriptorImpl).Dispose C.clang_ModuleMapDescriptor_dispose
func (_llcppg_param1 *ModuleMapDescriptorImpl) Dispose() {
// llgo:link ModuleMapDescriptor.Dispose C.clang_ModuleMapDescriptor_dispose
func (_llcppg_param1 ModuleMapDescriptor) Dispose() {
}
8 changes: 4 additions & 4 deletions tool/_testc/clang-c-22.1.8/Documentation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tool/_testc/clang-c-22.1.8/Documentation/out.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,8 @@ func CreateAPISet(tu Index.TranslationUnit, out_api *APISet) CXErrorCode.ErrorCo
//
// The provided \c CXAPISet can not be used after this function is called.
//
// llgo:link (*APISetImpl).Dispose C.clang_disposeAPISet
func (api *APISetImpl) Dispose() {
// llgo:link APISet.Dispose C.clang_disposeAPISet
func (api APISet) Dispose() {
}

// Generate a single symbol symbol graph for the given USR. Returns a null
Expand Down
Loading
Loading