================
@@ -617,11 +617,12 @@ static Cl::Kinds ClassifyBinaryOp(ASTContext &Ctx, const
BinaryOperator *E) {
assert(Ctx.getLangOpts().CPlusPlus &&
"This is only relevant for C++.");
- // For binary operators which are unknown due to type dependence, the
- // convention is to classify them as a prvalue. This does not matter much,
but
- // it needs to agree with how they are created.
+ // For binary operators which are unknown due to type dependence, use the
+ // value kind assigned when the expression was created. Dependent assignment
+ // expressions can be either lvalues or prvalues depending on whether they
+ // might resolve to an overloaded operator.
if (E->getType() == Ctx.DependentTy)
- return Cl::CL_PRValue;
+ return ClassifyExprValueKind(Ctx.getLangOpts(), E, E->getValueKind());
----------------
yronglin wrote:
Never mind. I create a new PR to use `ClassifyInternal`.
https://github.com/llvm/llvm-project/pull/202852, Could you help review? Many
thanks!
https://github.com/llvm/llvm-project/pull/202696
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits