Repository navigation
cl logicalClassOf: skip if class exists; rmSuffix => cutSuffixes: skip if empty; genAsMethod: use recv (maybe alias type); don't create non ptr recv logical class; logical class support NonClass check - #951
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #951 +/- ##
==========================================
+ Coverage 87.97% 87.99% +0.01%
==========================================
Files 23 23
Lines 2661 2665 +4
==========================================
+ Hits 2341 2345 +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 refactor of the logical-class generator. The logicalClass wrapper struct is replaced by passing named/base directly, and logicalClassOf/newLogicalType now return (*types.Named, bool) with the call site in cl/func.go properly guarding on the ok flag. The rmSuffix → cutSuffixes change is a genuine bugfix: it no longer produces an empty string when the whole name equals a suffix. The Spelling → Expansion switch in cl/ctx.go aligns goNode with goNodePos.
Build: go build ./cl/... passes. Security and performance passes found no issues (the refactor removes an allocation per logical class and adds negative-result caching).
Main point: the behavior of newLogicalType changed from reusing an existing same-named package type to refusing (returning nil, false), but the surrounding doc comments still describe the old reuse behavior. See inline notes.
MethodCheck— Type Method Detection in llcppg #945