[clang] [CIR] Upstream CompoundLiteralExpr for Scalar (PR #148943)

Amr Hesham via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 17 10:37:27 PDT 2025


================
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
+// RUN: %clang_cc1 -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 -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
+
+int foo() {
+  int e = (int){1};
----------------
AmrDeveloper wrote:

Complex type requires to handle it too in CIRGenExprComplex, i will do that in this PR and update tests

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


More information about the cfe-commits mailing list