Skip to content

Commit 3c011c9

Browse files
abadamsclaude
andcommitted
Make make_folded_const return overflow as [[nodiscard]] bool
Previously make_folded_const returned void and reported overflow via a bool& out parameter. Per review, callers could miss handling overflow because the parameter is easy to overlook. Make the function return the overflow flag directly, marked [[nodiscard]] so the compiler enforces that callers consider it. Callers that recurse accumulate via |=; consume sites (Overflows, Overflow predicates, evaluate_predicate's gating logic) read the return value directly. The constant_fold_bin_op helpers still take bool& since they already return the computed value. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 66f423e commit 3c011c9

1 file changed

Lines changed: 89 additions & 65 deletions

File tree

0 commit comments

Comments
 (0)