feat: C++ ADL V2: include class-typed reference args (incl. rvalue refs) in associated-namespace lookup#1595
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @magyargergo's task in 8m 33s —— View job C++ ADL PR #1595 — Production Readiness ReviewTasks:
1. Review bar for this PRThis is a C++ ADL (Koenig lookup) extension adding lvalue and rvalue reference args to the associated-namespace candidate set. The review bar is: correct ADL semantics for class-typed references, no new false positives for primitive references, no regression in existing fixture behavior, and green scope-parity CI in both legacy and scope-resolution paths. 2. Current PR stateThe most recent CI run (triggered at 2026-05-14T17:18:56Z, run ID 25874470247) shows:
The 3. Branch hygiene assessmentClassification: merge-from-main commit present but harmless and merge-safe.
4. Understanding of the changeThe PR removes the blanket 5. FindingsF1 — CI failure: primitive-reference test fails in legacy DAG
F2 —
|
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 9045 tests passed 1 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
@copilot you must address these findings and act as a senior static analysis engineer and iso c++ compiler engineer and follow DoD.md |
Addressed in
|
|
Claude finished @magyargergo's task in 9m 14s —— View job PR #1595 — Production Readiness ReviewTasks:
1. Review bar for this PRDoD.md §2.7 ("Tests cover the real changed path"), §6 ("Not Done" signals), and GUARDRAILS.md §Non-negotiables. The specific bar for this feature: class-typed lvalue refs, const refs, and rvalue refs must each produce ADL-driven CALLS edges; primitive refs must produce zero total CALLS edges; existing ADL tests must not regress; both 2. Current PR stateCI run 25876977477 on head
3. Branch hygiene assessmentClassification: merge-from-main commit present but harmless and merge-safe. Commits on the PR branch beyond main:
4. Understanding of the change
Data flow: 5. FindingsF1 — Prior blocker: primitive-reference test now properly isolated ✅ Resolved
F2 — Dead
|
@copilot address these findings |
Implemented in
|
…fs) in associated-namespace lookup (abhigyanpatwari#1595)
ADL was skipping reference arguments even when their underlying type was a class, so calls like
f(N::S&)failed to surface namespace candidates. This updates ADL argument handling to treat class-typed references like other participating class arguments while still excluding primitive references.ADL candidate selection
pickCppAdlCandidatesto stop excluding reference arguments whensimpleClassNameis present.findCppClassDefBySimpleName(...)and contribute the enclosing namespace toassociatedNamespaces, matching pointer/value behavior.Reference shape capture (rvalue support)
reference_declarator(&)rvalue_reference_declarator(&&)N::S&&arguments are classified correctly for ADL participation.ADL arg metadata cleanup
isReferencefromCppAdlArgInfoand related capture output now that ADL no longer branches on that flag.isPointerfromCppAdlArgInfoand related capture output, since ADL candidate selection readssimpleClassNameonly.Resolver fixtures/tests
cpp-adl-reference-arg-boundaryandcpp-adl-rvalue-reffixtures.record(audit::Event&)participates in ADL.recordConst(const audit::Event&)participates in ADL.note(int&)remains unresolved (0 edges), validating primitive references do not trigger ADL.record(audit::Event&&)participates in ADL.audit.hnow only definesEvent.record.hfor lvalue/const-ref coverage,record-rvalue.hfor rvalue-ref coverage).targetFilePathcontainsrecord-rvalue.hto ensure ADL wiring is actually exercised.