Skip to content

cl: conf.NonClass support globalFuncToMethod; tool: Config doc; cl: methodCheck.matchList - #963

Merged
xushiwei merged 2 commits into
goplus:mainfrom
xushiwei:q
Oct 7, 2026
Merged

xushiwei merged 2 commits into
goplus:mainfrom
xushiwei:q

Conversation

@xushiwei

@xushiwei xushiwei commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.10%. Comparing base (690938b) to head (a5dfb77).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #963      +/-   ##
==========================================
+ Coverage   88.09%   88.10%   +0.01%     
==========================================
  Files          23       23              
  Lines        2687     2691       +4     
==========================================
+ Hits         2367     2371       +4     
  Misses        320      320              
Flag Coverage Δ
llgo-tests 88.10% <100.00%> (+0.01%) ⬆️

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

Clean, well-scoped change. Extracting nonClass() is a solid DRY improvement, the refactored tryToMethod() preserves the prior 4-tuple contract and nil-safety (tn.Pkg() may be nil for predeclared types but is only compared, never dereferenced), and the per-field docs on tool.Config are a real readability win. The getCString -> clang_getCString Rename-key fix is correct and matches the regenerated fixtures (CXString/out.go, include/clang-c/CXString.h). No security or performance concerns — contains() is a tiny O(n) scan on an offline code-gen path.

A couple of minor documentation nits are inline. Two additional notes that don't map to changed lines:

  • cl/ctx.go:132 — the internal field comment still reads // typedef names to be treated as non-classes. This PR deliberately gives NonClass a dual meaning and documents it in both Config structs, but conf.NonClass flows straight into ctx.nonClasses (cl/compile.go:274) and is now also consumed with the Go-type-name meaning at cl/func.go:333. Worth updating this comment so the two meanings stay in sync.
  • (Optional) cl/func.go:308-323 — the *types.Alias branch keeps an extra tn.Obj().Pkg() == pkgTypes check on the unaliased type that the *types.Named branch doesn't need (this is pre-existing). A one-line comment on why the alias path needs that underlying-package check would help a future reader avoid "simplifying" it away.

Comment thread tool/config.go
Comment thread tool/config.go
@xushiwei xushiwei changed the title cl: conf.NonClass support globalFuncToMethod; tool: Config doc cl: conf.NonClass support globalFuncToMethod; tool: Config doc; cl: methodCheck.matchList Oct 7, 2026
@xushiwei
xushiwei merged commit 13ee9ae into goplus:main Oct 7, 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