The point of a constexpr if statement is to determine which branch to
take at compile time, so warning on unreachable code is meaningless in
these situations.
Fixes #57123.
Differential D131818
[clang][diagnostics] Don't warn about unreachable code in constexpr if ayzhao on Aug 12 2022, 4:45 PM. Authored by
Details The point of a constexpr if statement is to determine which branch to Fixes #57123.
Diff Detail
Event TimelineComment Actions Thanks! Can you add a test for non-constexpr unreachable code within the constexpr if and test that that still warns? |