Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#996 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, go
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
39
Fork
13
Merge medio
1h 38m
PR unite (30g)
250

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di goplus/llcppg

Tutte le issue di goplus/llcppg

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.