Skip to content

cl loadTypedef: fix TypeIgnore; cmd/llcppg: support subPkgs - #879

Merged
xushiwei merged 3 commits into
goplus:mainfrom
xushiwei:q
Sep 30, 2026
Merged

xushiwei merged 3 commits into
goplus:mainfrom
xushiwei:q

Conversation

@xushiwei

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.36%. Comparing base (a91158e) to head (1947404).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
cl/type.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #879      +/-   ##
==========================================
+ Coverage   87.32%   88.36%   +1.04%     
==========================================
  Files          22       22              
  Lines        1878     1857      -21     
==========================================
+ Hits         1640     1641       +1     
+ Misses        238      216      -22     
Flag Coverage Δ
llgo-tests 88.36% <80.00%> (+1.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

This PR moves Gen from tool/gen.go into cmd/llcppg/gen.go and adds sub-package generation (Pkgs + Apply + genPkg/convPkg), refines the block-pointer log message, switches typedef ignore matching to the trimmed local name, and fixes config comments.

The core refactor is sound: the expensive clang.Index is correctly shared across sub-packages, gogen.GeneratedHeader is restored via defer, and trimTypeTag now normalizes tagged C names consistently with the rest of cl. No performance concerns.

The findings below are about robustness and consistency in the new sub-package path plus a comment accuracy nit. None are blocking.

Additional findings

  • tool/config.go:69: [P3] Document (and consider validating) Apply's selective field inheritance: Apply inherits only Language, Stdlib, LLGoPackage, CFlags, and Deps from the parent; TypeIgnore, Rename, the *Prefix fields, TypeAbbr, Class/NonClass, NSIgnore, and Dir/Files are not. If this selective inheritance is intentional, a doc comment on Apply listing which fields are inherited (and why the rest are excluded) would prevent future "bug or feature?" confusion.

Comment thread cmd/llcppg/gen.go
Comment thread cmd/llcppg/gen.go
Comment thread tool/config.go Outdated
Comment thread cmd/llcppg/gen.go
@xushiwei
xushiwei merged commit 5e43a9e into goplus:main Sep 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant