[clang] [CIR] Upstream support for references (PR #138001)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 30 12:41:52 PDT 2025


================
@@ -102,3 +102,20 @@ size_type max_size() {
 // CHECK:   %3 = cir.cast(integral, %2 : !s32i), !u64i
 // CHECK:   %4 = cir.const #cir.int<8> : !u64i
 // CHECK:   %5 = cir.binop(div, %3, %4) : !u64i
+
+void ref_arg(int &x) {
+  int y = x;
+  x = 3;
+}
----------------
erichkeane wrote:

OK, sounds good. Please change the  title then to say "Upstream support for L-Value References"

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


More information about the cfe-commits mailing list