[clang] [CIR] Upstream support for references (PR #138001)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 30 12:08:50 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;
+}
----------------
andykaylor wrote:
After looking into it a bit more, I don't want to handle r-value references yet. It needs more handling. The other cases are added along with the little extra support they required.
https://github.com/llvm/llvm-project/pull/138001
More information about the cfe-commits
mailing list