[clang] [CIR] Support pointer-to-data-member binary operators for aggregates (PR #221784)

Aman Maurya via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 00:41:37 PDT 2026


================
@@ -427,12 +427,15 @@ class AggExprEmitter : public StmtVisitor<AggExprEmitter> {
 
   void VisitPredefinedExpr(const PredefinedExpr *e) { emitAggLoadOfLValue(e); }
   void VisitBinaryOperator(const BinaryOperator *e) {
-    cgf.cgm.errorNYI(e->getSourceRange(),
-                     "AggExprEmitter: VisitBinaryOperator");
+    if (e->getOpcode() == BO_PtrMemD || e->getOpcode() == BO_PtrMemI)
+      VisitPointerToDataMemberBinaryOperator(e);
+    else
+      cgf.cgm.errorNYI(e->getSourceRange(),
+                       "AggExprEmitter: VisitBinaryOperator");
----------------
amanmaurya92 wrote:

Thanks, implemented 👍 

https://github.com/llvm/llvm-project/pull/221784


More information about the cfe-commits mailing list