Index: clang/lib/AST/ExprConstant.cpp =================================================================== --- clang/lib/AST/ExprConstant.cpp +++ clang/lib/AST/ExprConstant.cpp @@ -10173,7 +10173,7 @@ /// Evaluate an expression of record type as a temporary. static bool EvaluateTemporary(const Expr *E, LValue &Result, EvalInfo &Info) { assert(!E->isValueDependent()); - assert(E->isPRValue() && E->getType()->isRecordType()); + assert(E->isPRValue()); return TemporaryExprEvaluator(Info, Result).Visit(E); } Index: clang/test/AST/issue53741.cpp =================================================================== --- /dev/null +++ clang/test/AST/issue53741.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -fsyntax-only %s -verify +// expected-no-diagnostics +typedef bool Var; +bool foobool() { + return (bool().Var::~Var(), false); +} + +