================
@@ -1725,14 +1725,15 @@ static bool EvaluateBinaryTypeTrait(Sema &Self,
TypeTrait BTT,
// Build expressions that emulate the effect of declval<T>() and
// declval<U>().
- if (LhsT->isObjectType() || LhsT->isFunctionType())
- LhsT = Self.Context.getRValueReferenceType(LhsT);
- if (RhsT->isObjectType() || RhsT->isFunctionType())
- RhsT = Self.Context.getRValueReferenceType(RhsT);
- OpaqueValueExpr Lhs(KeyLoc, LhsT.getNonLValueExprType(Self.Context),
- Expr::getValueKindForType(LhsT));
- OpaqueValueExpr Rhs(KeyLoc, RhsT.getNonLValueExprType(Self.Context),
- Expr::getValueKindForType(RhsT));
+ auto createOpaqueExpr = [&](QualType Ty) -> OpaqueValueExpr {
----------------
erichkeane wrote:
Ah, shoot... a better name looking at the comment is `createDeclValExpr`.
Sorry, i should have suggested that in the 1st place.
https://github.com/llvm/llvm-project/pull/144836
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits