[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

Amr Hesham via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 4 10:28:04 PDT 2025


================
@@ -0,0 +1,227 @@
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
+// RUN: %clang_cc1 -x c -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
+// RUN: %clang_cc1 -x c -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
+// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
+// RUN: %clang_cc1 -x c -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
+// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
+
----------------
AmrDeveloper wrote:

This case requires a part that is not implemented either in LLVM or the incubator. I will implement it in the incubator first and then upstream it here in a following PR

https://github.com/llvm/llvm-project/blob/70af09e3a19c7465a6b263385ffcbbaa3a1a51e4/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp#L1073

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


More information about the cfe-commits mailing list