Commit graph

1 commit

Author SHA1 Message Date
trvon
84a3126c35
feat(symbolic): wrap clang::UninitVariablesAnalysis
Adds fold::symbolic::runUninitAnalysisOnTU(ctx) returning aggregate
counts of functions with local read-before-write uses, derived from
clang's UninitVariablesAnalysis. Scope reminder pinned by the 4
unit tests: this flags LOCAL variable uninit reads, NOT parameter
nullability. The original matrix C5 framing ("null-deref FP triage
pre-pass") was wrong-hypothesis — the analyzer treats parameters as
always-initialised, so it cannot drive null-deref triage.

CFG build options need AddInitializers + setAllAlwaysAdd before the
per-fn AnalysisDeclContext sees decl initializers; without that the
analyzer silently reports zero uses.

Scan-pipeline integration deferred — needs a per-TU accumulator
threaded through the priming consumer.

Refs docs/library-expansion-matrix.md row C5.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 23:02:39 -04:00