File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -2634,6 +2634,11 @@ LValue CIRGenFunction::emitLValue(const Expr *E) {
2634
2634
// bitfield lvalue or some other non-simple lvalue?
2635
2635
return LV;
2636
2636
}
2637
+ case Expr::CXXDefaultArgExprClass: {
2638
+ auto *DAE = cast<CXXDefaultArgExpr>(E);
2639
+ CXXDefaultArgExprScope Scope (*this , DAE);
2640
+ return emitLValue (DAE->getExpr ());
2641
+ }
2637
2642
case Expr::ParenExprClass:
2638
2643
return emitLValue (cast<ParenExpr>(E)->getSubExpr ());
2639
2644
case Expr::DeclRefExprClass:
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -std=c++17 %s -o - | FileCheck %s
2
+
3
+ void bar (const int &i = 42 );
4
+
5
+ void foo () {
6
+ bar ();
7
+ }
8
+
9
+ // CHECK: [[TMP0:%.*]] = cir.alloca !s32i
10
+ // CHECK: [[TMP1:%.*]] = cir.const #cir.int<42>
11
+ // CHECK: cir.store [[TMP1]], [[TMP0]]
12
+ // CHECK: cir.call @_Z3barRKi([[TMP0]])
You can’t perform that action at this time.
0 commit comments