Skip to content

cl compileFuncOrMethod: skip template method - #871

Merged
xushiwei merged 1 commit into
goplus:mainfrom
xushiwei:q
Sep 29, 2026
Merged

xushiwei merged 1 commit into
goplus:mainfrom
xushiwei:q

Conversation

@xushiwei

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.12%. Comparing base (3ebcaa5) to head (48caf47).
⚠️ Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
cl/class.go 66.66% 1 Missing ⚠️
cl/vtable.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #871      +/-   ##
==========================================
+ Coverage   82.09%   85.12%   +3.03%     
==========================================
  Files          22       22              
  Lines        1798     1802       +4     
==========================================
+ Hits         1476     1534      +58     
+ Misses        322      268      -54     
Flag Coverage Δ
llgo-tests 85.12% <92.00%> (+3.03%) ⬆️

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: switch func-object map key from mangling name to USR

The refactor is clean and internally consistent. Every access to the renamed ctx.fns map (addFunc, loadOutsideMethod, vtableMethodName) now keys on funcUSR(...), no references to the removed funcObj.manglingName remain, and the struct comment was updated to fnUSR => func object. Two positive changes worth noting: avoidKeyword is now a pure return-a-string function (no pointer mutation), and moving clang.Mangling into compileFuncOrMethod means mangling is computed once per func instead of twice.

The empty-string guard added only to clang/mangling_withprefix.go (darwin) is correct — the linux variant in clang/mangling_normal.go does not slice [1:], so it cannot panic on an empty name; both now return "" consistently.

Findings below are non-blocking robustness/coverage observations.

Comment thread cl/ctx.go
Comment thread cl/_testcpp/template_class/out.go
@xushiwei
xushiwei merged commit 288217d into goplus:main Sep 29, 2026
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