================
@@ -230,3 +230,28 @@ void init_expr(int a, int b, int c) {
// OGCG: %[[C_PLUS_THREE:.*]] = add nsw i32 %[[C]], 3
// OGCG: store i32 %[[C_PLUS_THREE]], ptr %[[S_C]]
// OGCG: ret void
+
+void cxx_default_init_with_struct_field() {
----------------
andykaylor wrote:
It looks to me like this test will pass even without the change in this PR. I
think you need something like this:
```
struct Parent {
int getA();
int a = getA();
struct {
int b;
} child;
};
```
The call to `getA()` in the default initializer requires a `this` parameter. I
don't think the child struct is needed.
https://github.com/llvm/llvm-project/pull/165994
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits