Index: test/Import/cxx-default-init-expr/Inputs/S.cpp =================================================================== --- /dev/null +++ test/Import/cxx-default-init-expr/Inputs/S.cpp @@ -0,0 +1,9 @@ +struct Foo { + int i; +}; + +struct S { + int int_member = 3; + float float_member = 3.0f; + Foo class_member = Foo(); +}; Index: test/Import/cxx-default-init-expr/test.cpp =================================================================== --- /dev/null +++ test/Import/cxx-default-init-expr/test.cpp @@ -0,0 +1,22 @@ +// RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s +// CHECK: CXXCtorInitializer +// CHECK-SAME: 'int_member' +// CHECK-SAME: 'int' +// CHECK-NEXT: CXXDefaultInitExpr +// CHECK-SAME: 'int' + +// CHECK-NEXT: CXXCtorInitializer +// CHECK-SAME: 'float_member' +// CHECK-SAME: 'float' +// CHECK-NEXT: CXXDefaultInitExpr +// CHECK-SAME: 'float' + +// CHECK-NEXT: CXXCtorInitializer +// CHECK-SAME: 'class_member' +// CHECK-SAME: 'Foo' +// CHECK-NEXT: CXXDefaultInitExpr +// CHECK-SAME: 'Foo' + +void expr() { + struct S s; +}