Repository navigation
cl: conf.NonClass support globalFuncToMethod; tool: Config doc; cl: methodCheck.matchList - #963
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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 givesNonClassa dual meaning and documents it in bothConfigstructs, butconf.NonClassflows straight intoctx.nonClasses(cl/compile.go:274) and is now also consumed with the Go-type-name meaning atcl/func.go:333. Worth updating this comment so the two meanings stay in sync.- (Optional)
cl/func.go:308-323— the*types.Aliasbranch keeps an extratn.Obj().Pkg() == pkgTypescheck on the unaliased type that the*types.Namedbranch 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.
Uh oh!
There was an error while loading. Please reload this page.