Repository navigation
C++ constructor with a brace-init in its initializer list keeps its whole body (Part of #5630) - #6754
Conversation
…hole body (Part of #5630) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… its body (powertoys FancyZones.cpp) (Part of #5630) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…day recall .9887 -> .9906) (Part of #5630) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No description provided. |
|
No description provided. |
|
PR #6754 @ e8bd45f: 3 failed check(s) == shard 1 (1669449 LOC) (failure) -- real == shard 2 (1666363 LOC) (failure) -- real == shard 3 (1667394 LOC) (failure) -- real |
|
No description provided. |
|
PR #6754 @ e8bd45f: 3 failed check(s) == shard 1 (1669449 LOC) (failure) -- real == shard 2 (1666363 LOC) (failure) -- real == shard 3 (1667394 LOC) (failure) -- real |
1 similar comment
|
PR #6754 @ e8bd45f: 3 failed check(s) == shard 1 (1669449 LOC) (failure) -- real == shard 2 (1666363 LOC) (failure) -- real == shard 3 (1667394 LOC) (failure) -- real |
Part of #5630.
What
A C++ constructor whose member-initializer list holds a brace-init (
hiddenTags({"a", "b"}),ids{1, 2}, a lambda argument with nested braces) lost its body: thefunc_startrule's initializer run (:[^{;]{0,2000}) stopped at the brace-init's{, and Mode B (_slice_by_braces) takes the first{from the match start as the body brace, so the unit ended three lines in and every call in the real body was credited to nobody. doomsdayImpl(packageswidget.cpp:504) lost 60 edges.Fix:
cpp.pyfunc_start consumes balanced initializer entries (paren groups holding up to three brace levels, and identifier-attached flat brace-inits), falling back to the old plain run when an entry does not balance;detector.pyMode B takesmatch.end() - 1as the body brace for cpp when the match ends in{and an earlier{sits inside it (this also covers a= {}default argument).Evidence (DOOM callgraph oracle, 23 ports rescanned at 718e6d5, before merging #6753)
absentedges, newly bodied units)--fail-on-regressionagainst the old baseline passes; baseline regenerated. Doomsday misses by shape: statement 155 -> 103, other 98 -> 74, after-operator 58 -> 39, nested-argument 67 -> 48.Golden re-bless (both legs): drift is
cpp/powertoys/FancyZones.cpp(the lambda-in-initializer shape) plus the spatial-coordinate shifts that follow from its changed mass; no other language's extraction moved.Merged-engine baseline (10e59df, includes #6753): doomsday recall 0.9918, precision 0.9656 (agree 69036);
--fail-on-regressionagainst main's baseline passes before the regeneration. The per-port table above was measured before the merge.Class / Sibling gaps
Class: a C++ function whose unit ends before its real body because a
{precedes the body brace inside the matched head. Members handled here: constructor init-list brace-initx({..})andx{..}, lambda argument in an init-list entry (nested braces to depth 3),= {}default argument. Tests:test_cpp_ctor_init_brace_5630.py(5 init shapes, plain list, default arg).Sibling gaps (none from the burned COBOL estates; DOOM oracle only):
unparsed243 misses in doomsday: macro class headers (DE_GUI_PIMPL(X),DE_PIMPL,DE_OBSERVES) whose bodies are methods under a macro "function"; different mechanism (macro-class extent), next slice.statement84 and doomsdayctor-init92 misses: not examined here.Remaining slices
Macro-class header extent (cpp.py + detector.py + test + baseline); #3784 libclang reference is still open (acceptance item not met here).
Gates
pr_gates --fast9/9,--ratchets9/9 pass (0 skipped), pre-PR guards + time ratchet pass; C/C++ extraction tests pass. Cross-repo: none.Lessons for agents
doom_speedrun.py scankeys scans by HEAD sha: commit the engine change before scanning, and a symlink to an older sha's scan is valid only whilegitgalaxy/is unchanged.{from the match start, not the match's own last{: any func_start head that can contain{needs the detector side fixed too, not just the regex.🤖 Generated with Claude Code