Open
Description
It seems that immediate invocations in constexpr initailizers are evaluated twice, once on evaluating the decl, and again on Sema::HandleImmediateInvocations (this doesn't happen if the var is within a consteval function). Strictly speaking, not a defect, but it's kinda wasteful?
consteval int foo(int* b) {
return *b; // Evaluation errors are emitted twice
}
constexpr int a = foo(nullptr);