Closed as duplicate of#53741
Description
Program: x86-64 clang 19.1.0 (assertions)
Example: Compiler Explorer
Log (same output inside the CE link above): clang-log.txt
Given the code:
void nop(void) noexcept
{
typedef int T;
return T{}.~T();
}
LLVM frontend crashes with assertion failure:
clang++: /root/llvm-project/clang/lib/AST/ExprConstant.cpp:10704: bool EvaluateTemporary(const clang::Expr*, {anonymous}::LValue&, {anonymous}::EvalInfo&): Assertion `E->isPRValue() && E->getType()->isRecordType()' failed.
Removing return
keyword and leaving T{}.~T();
compiles successfully.