[clang] [clang] Use ClassifyInternal in binary op value kind classification when the binary op is type dependent (PR #202852)

Yihan Wang via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 22:00:57 PDT 2026


https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/202852

This is a follow up PR for https://github.com/llvm/llvm-project/pull/202696. 

In 202693, we use `ClassifyExprValueKind`,  this PR changed to use `ClassifyInternal`, which is what seems to be used everywhere else.

>From 6451a2d37ed5b8c3ec800ebe1459910533fd46a0 Mon Sep 17 00:00:00 2001
From: yronglin <yronglin777 at gmail.com>
Date: Wed, 10 Jun 2026 12:32:32 +0800
Subject: [PATCH] [clang] Use ClassifyInternal in binary op value kind
 classification when the binary op is type dependent

Signed-off-by: yronglin <yronglin777 at gmail.com>
---
 clang/lib/AST/ExprClassification.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp
index d153afda71c4b..0b848d283d763 100644
--- a/clang/lib/AST/ExprClassification.cpp
+++ b/clang/lib/AST/ExprClassification.cpp
@@ -622,7 +622,7 @@ static Cl::Kinds ClassifyBinaryOp(ASTContext &Ctx, const BinaryOperator *E) {
   // expressions can be either lvalues or prvalues depending on whether they
   // might resolve to an overloaded operator.
   if (E->getType() == Ctx.DependentTy)
-    return ClassifyExprValueKind(Ctx.getLangOpts(), E, E->getValueKind());
+    return ClassifyInternal(Ctx, E);
 
   // C++ [expr.ass]p1: All [...] return an lvalue referring to the left operand.
   // Except we override this for writes to ObjC properties.



More information about the cfe-commits mailing list