Skip to content

cl loadTypedef: ignore Cursor_TypeAliasTemplateDecl; tool test: TestLLVM_iterator_range - #875

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

xushiwei merged 2 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 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.77%. Comparing base (4fc9d90) to head (2313eef).
⚠️ Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
cl/compile.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #875      +/-   ##
==========================================
+ Coverage   86.65%   86.77%   +0.11%     
==========================================
  Files          22       22              
  Lines        1829     1830       +1     
==========================================
+ Hits         1585     1588       +3     
+ Misses        244      242       -2     
Flag Coverage Δ
llgo-tests 86.77% <90.00%> (+0.11%) ⬆️

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: template type-alias / using-declaration handling

This PR extends declaration handling to skip C++ template type aliases (Cursor_TypeAliasTemplateDecl), treat using-declarations as no-ops, and thread the enclosing class scope through loadTypedef so class-nested typedefs resolve template type parameters. It also upgrades log.Panicln/log.Println to ctx.panicf/ctx.logf, which is a nice improvement since those attach source position to diagnostics. The new TestLLVM_ADL fixture exercises exactly these paths (ADL.h contains function templates, a using-based adl_detail namespace, and template-dependent type aliases), and the near-empty out.go confirms they are correctly skipped.

Verified: scopeCtx is the first embedded field of classCtx, so the unsafe.Pointer cast in scope() is sound; passing nil scope from the top-level loadDecl call site is safe because lookupType guards with a nil-receiver loop. No correctness-blocking issues. Two minor polish items are noted inline.

Comment thread cl/typedef.go Outdated
Comment thread cl/compile.go Outdated
@xushiwei xushiwei changed the title cl loadTypedef: ignore Cursor_TypeAliasTemplateDecl cl loadTypedef: ignore Cursor_TypeAliasTemplateDecl; tool test: TestLLVM_iterator_range Sep 30, 2026
@xushiwei
xushiwei merged commit 122274d into goplus:main Sep 30, 2026
2 of 4 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