[clang] fix constexpr code generation for user conversions.
When building the member call to a user conversion function during an implicit cast, the expression was not being checked for immediate invocation, so we were never adding the ConstantExpr node to AST. This would cause the call to the user conversion operator to be emitted even if it was constantexpr evaluated, and this would even trip an assert when said user conversion was declared consteval: `Assertion failed: !cast<FunctionDecl>(GD.getDecl())->isConsteval() && "consteval function should never be emitted", file clang\lib\CodeGen\CodeGenModule.cpp, line 3530` Fixes PR48855. Signed-off-by:Matheus Izvekov <mizvekov@gmail.com> Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D105446
Loading
Please sign in to comment