================ @@ -7558,6 +7558,18 @@ ExprResult Sema::BuildExpressionFromDeclTemplateArgument( } else { assert(ParamType->isReferenceType() && "unexpected type for decl template argument"); + + if (auto *Method = dyn_cast<CXXMethodDecl>(VD); + Method && Method->isExplicitObjectMemberFunction()) { + // If the argument is an explicit object member function, + // RefExpr is currently a prvalue. Make it an lvalue. + RefExpr = ImplicitCastExpr::Create( + Context, RefExpr.get()->getType(), CK_NoOp, RefExpr.get(), ---------------- efriedma-quic wrote:
I don't think CK_NoOp is the right CastKind, even if it appears to work for simple cases. Either we should just use UO_Deref, or we should create a new CastKind. https://github.com/llvm/llvm-project/pull/133748 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits