I've found very simple case where clang gives wrong diagnosis. Let's consider smallest possible program: ``` #include <type_traits> int main() { if constexpr (std::is_same_v<int, int>) {} else if constexpr (std::is_same_v<double, int>) {} } ``` clang outputs: ``` error: constexpr if condition is not a constant expression else if constexpr (std::is_same_v<double, int>) {} ``` Cause of this is statement: `if constexpr (std::is_same_v<int, int>)` any further `if constexpr` statement is not considered as constant expression.
I put a patch up here: https://reviews.llvm.org/D48322
The patch landed as r336233. Thanks for reporting this!