[clang] [Clang][Sema] Suppress -Wconstant-conversion in unselected conditional operands (PR #226775)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 16 18:09:58 PDT 2026
filaka771 wrote:
Following the [feedback on compile-time overhead](https://github.com/llvm/llvm-project/issues/223923#issuecomment-6192146930), I've reworked the implementation to defer condition evaluation until an integer conversion becomes a candidate for `-Wconstant-conversion`. Instead of passing an eagerly computed `IsKnownUnreachable` flag, the analysis records the enclosing conditional operands. When a candidate warning needs a reachability decision, it checks that path and caches the results, so multiple conversions under the same conditional don't repeatedly evaluate its condition.
https://github.com/llvm/llvm-project/pull/226775
More information about the cfe-commits
mailing list