Repository navigation
WHAM can now compact conventional header guards when local directives prove their bodies inactive. Partial compaction preserves repeatable text outside the guard and recovers the omitted block from a complete retained copy.
- Unknown macro states, ordinary code, external includes, pragmas, and unknown expressions discard the proof. Architecture-dependent branches remain intact.
- Many declaration-heavy headers deliberately remain expanded; this is conservative definedness analysis, not a full preprocessor.
- Recovery format v5 preserves edited retained bodies, reports divergent copies, and rejects malformed fragment references. Existing v1-v4 outputs remain readable.
- The wrapped recovery footer still has a 120-character physical line limit.
New outputs require WHAM 1.7.0 or newer for recovery. Recover and regenerate from source when changing include order or guard behaviour.
Validated with 73 automated tests, 120 original/generated Clang comparisons of emitted tokens and final macro definitions plus syntax checks across x64/ARM64 and both conditional settings, and a native MultiWM test build with exact recovery of its 16 files.
Install from the VS Code Marketplace, or download the attached VSIX and use Extensions: Install from VSIX….