assert(E && getComplexType(E->getType()) &&
"Invalid complex expression to emit");
- return ComplexExprEmitter(*this, IgnoreReal, IgnoreImag)
- .Visit(const_cast<Expr*>(E));
+ bool hasDebugInfo = getDebugInfo();
+ if (isa<CXXDefaultArgExpr>(E))
+ disableDebugInfo();
+ auto R = ComplexExprEmitter(*this, IgnoreReal, IgnoreImag)
+ .Visit(const_cast<Expr *>(E));
+ if (isa<CXXDefaultArgExpr>(E) && hasDebugInfo)
+ enableDebugInfo();
+ return R;
}
void CodeGenFunction::EmitComplexExprIntoLValue(const Expr *E, LValue dest,
f23_b();
}
+// CHECK-LABEL: define
+void f24_a(__complex float = complex_src());
+void f24() {
+// CHECK: call {{.*}}complex_src{{.*}}, !dbg [[DBG_F24:![0-9]*]]
+#line 2600
+ f24_a();
+}
+
// CHECK: [[DBG_F1]] = !MDLocation(line: 100,
// CHECK: [[DBG_FOO_VALUE]] = !MDLocation(line: 200,
// CHECK: [[DBG_FOO_REF]] = !MDLocation(line: 202,
// CHECK: [[DBG_F19_2]] = !MDLocation(line: 2101,
// CHECK: [[DBG_F20_1]] = !MDLocation(line: 2200,
// CHECK: [[DBG_F23]] = !MDLocation(line: 2500,
+// CHECK: [[DBG_F24]] = !MDLocation(line: 2600,