Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

fix(cl): Async++ conversion operator reaches unknown cursor kind 26

Đang mở
#996 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
62/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, go
Lĩnh vực
tooling

Hướng nghiên cứu

The panic comes from the loadDecl switch in cl/preload.go, which has no case for Cursor_ConversionFunction, though the class-local newClassCtx path already handles it; compare the two to see how that cursor kind is treated. Reproduce by generating bindings for the Async++ headers with llcppg as described in the issue, or start from explicit operator bool() in ref_count.h:146. Done when that header no longer panics with kind 26 and the conversion operator is handled consistently with the existing path.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Observed failure

The recursive installed-header generation for Async++ reaches explicit operator bool() const in async++/ref_count.h:146 and panics in loadDecl with cursor kind 26.

panic: .../include/async++/ref_count.h:146:2: loadDecl: unknown kind - 26
github.com/goplus/llcppg/cl.loadDecl
    cl/preload.go:152

Confirmed Linux arm64 CI job. Formula testing and both compiler/tool builds succeeded; Test llcppg generation is the failing step. Other matrix jobs were still pending when this report was prepared, so this is not a claim that every platform has reproduced the failure.

Versions and reproduction input

  • llcppg: 8fc0f987e41ffe4b4f608e9541422b460ea89fea.
  • LLGo: afe9a5407260348b18c7104e98d76cb5cdf48b29; LLVM 21, Linux arm64.
  • Actual installed source: Amanieu/asyncplusplus v1.2, commit 4159da79e20ad6d0eb1f13baa0f10e989edd9fba, ref_count.h.
  • Failed configuration is from index PR #7, head 49abce7:
{
  "Name": "async",
  "Language": "c++",
  "Dir": "./include/...",
  "LLGoPackage": "link: $(pkg-config --libs async++)",
  "NSPrefix": ["async::"]
}

Stage the installed headers under source/include, initialize the source Go module as in the linked workflow, and run llcppg -v ./generated ./source. There is no Files allowlist or ignored API in this configuration.

Expected behavior and source evidence

A valid conversion operator should not fall into an unknown-cursor panic. The current-main loadDecl switch handles CXX methods, constructors, and destructors, but not Cursor_ConversionFunction. The same file's class-local newClassCtx path does handle Cursor_ConversionFunction, so the existing handling does not cover the path reached by this input.

Latest main (aab6dbf0baedc47b42f9576a65dd79ce6715e31a) was inspected only, not executed. The job also logs missing-package warnings for some GCC 14 C++ headers; their causal relationship to this panic has not been established and is not asserted here.

Ngôn ngữ chính
Go
Star
39
Fork
13
Merge trung bình
1 giờ 28 phút
Pull request đã merge (30 ngày)
256

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của goplus/llcppg

Tất cả issue của goplus/llcppg

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.