GitNexus/gitnexus/test/unit/cfg
Gergo Magyar 5165d71d7b fix(cfg): harvest C++ structured-binding defs (auto [a,b]=e) (#2195)
The C++ def/use harvester only recorded a def when an init_declarator's
declarator was a plain identifier, so a structured binding (auto [a,b] = mk(),
incl. the auto& reference form whose binding sits under a reference_declarator)
declared only the first name in phase 1 and emitted ZERO defs in phase 2 — a,b
were walked as spurious uses and later use(a)/use(b) resolved to a synthetic
module binding, silently corrupting REACHING_DEF/taint for an idiomatic C++17
shape. Unwrap the structured_binding_declarator in both phases and def every
identifier leaf; result-of-initializer flows to the whole list. Inert for C
(no structured bindings). Characterization tests added (plain + reference form).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 18:39:28 +00:00
..
c-cpp-visitor.test.ts fix(cfg): harvest C++ structured-binding defs (auto [a,b]=e) (#2195) 2026-06-14 18:39:28 +00:00
cfg-builder.test.ts feat(ingestion): add control-flow-graph layer for TS/JS (#2081) (#2099) 2026-06-10 19:26:45 +01:00
control-dependence.test.ts fix(cfg): synthetic-escape pass restores CDG for exit-unreachable cycles (#2195 U1) 2026-06-14 15:58:50 +00:00
csharp-visitor.test.ts style(cfg): apply prettier + drop unused imports across the PDG files (#2195) 2026-06-14 17:29:48 +00:00
dart-visitor.test.ts test(cfg): consolidate copied visitor-test helpers into cfg-harness (#2195 U8) 2026-06-14 16:54:45 +00:00
emit-guard.test.ts feat(cfg): intra-procedural REACHING_DEF data-dependence layer (#2082) (#2160) 2026-06-11 05:49:39 +01:00
go-visitor.test.ts style(cfg): apply prettier + drop unused imports across the PDG files (#2195) 2026-06-14 17:29:48 +00:00
harness.test.ts style(cfg): apply prettier + drop unused imports across the PDG files (#2195) 2026-06-14 17:29:48 +00:00
harvest.test.ts feat(cfg): defensive per-statement cap on harvested taint sites (#2195 U11) 2026-06-14 17:08:15 +00:00
java-visitor.test.ts style(cfg): apply prettier + drop unused imports across the PDG files (#2195) 2026-06-14 17:29:48 +00:00
kotlin-visitor.test.ts test(cfg): consolidate copied visitor-test helpers into cfg-harness (#2195 U8) 2026-06-14 16:54:45 +00:00
opt-in.test.ts feat(ingestion): add control-flow-graph layer for TS/JS (#2081) (#2099) 2026-06-10 19:26:45 +01:00
php-visitor.test.ts style(cfg): apply prettier + drop unused imports across the PDG files (#2195) 2026-06-14 17:29:48 +00:00
post-dominators.test.ts feat(pdg): control dependence — post-dominators + CDG (Ferrante) [M5 #2085] (#2188) 2026-06-13 18:49:03 +01:00
python-visitor.test.ts style(cfg): apply prettier + drop unused imports across the PDG files (#2195) 2026-06-14 17:29:48 +00:00
reaching-defs.test.ts feat(cfg): intra-procedural REACHING_DEF data-dependence layer (#2082) (#2160) 2026-06-11 05:49:39 +01:00
ruby-visitor.test.ts style(cfg): apply prettier + drop unused imports across the PDG files (#2195) 2026-06-14 17:29:48 +00:00
rust-visitor.test.ts style(cfg): apply prettier + drop unused imports across the PDG files (#2195) 2026-06-14 17:29:48 +00:00
swift-visitor.test.ts style(cfg): apply prettier + drop unused imports across the PDG files (#2195) 2026-06-14 17:29:48 +00:00
synthetic-escape.test.ts fix(cfg): synthetic-escape pass restores CDG for exit-unreachable cycles (#2195 U1) 2026-06-14 15:58:50 +00:00
typescript-visitor.test.ts test(cfg): consolidate copied visitor-test helpers into cfg-harness (#2195 U8) 2026-06-14 16:54:45 +00:00
vue-visitor.test.ts test(cfg): consolidate copied visitor-test helpers into cfg-harness (#2195 U8) 2026-06-14 16:54:45 +00:00