/** * Pass #22: dead-code (CWE-561, category: reliability) * * Detects CFG blocks that are structurally unreachable from the entry block * (i.e., no path of control-flow edges leads to them). This is pure CFG * reachability — independent of constant-propagation or taint analysis. * * Examples: code after an unconditional `return`/`throw`, branches of * `if (false)` where the condition is a literal (compiler-level dead code). * * Note: semantic dead code eliminated by constant propagation (e.g., * `if (DEBUG_MODE) { ... }` where DEBUG_MODE is a compile-time constant) * is handled by ConstantPropagationPass, not this pass. */ import type { CFGBlock } from '../../types/index.js'; import type { AnalysisPass, PassContext } from '../../graph/analysis-pass.js'; export interface DeadCodePassResult { /** CFG blocks with no incoming reachable path from the entry block. */ deadBlocks: CFGBlock[]; } export declare class DeadCodePass implements AnalysisPass { readonly name = "dead-code"; readonly category: "reliability"; run(ctx: PassContext): DeadCodePassResult; } //# sourceMappingURL=dead-code-pass.d.ts.map