[PATCH] D50732: [ASTImporter] Add test for CXXDefaultInitExpr
Raphael Isemann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 15 18:38:23 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL339839: [ASTImporter] Add test for CXXDefaultInitExpr (authored by teemperor, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D50732?vs=160678&id=160967#toc
Repository:
rL LLVM
https://reviews.llvm.org/D50732
Files:
cfe/trunk/test/Import/cxx-default-init-expr/Inputs/S.cpp
cfe/trunk/test/Import/cxx-default-init-expr/test.cpp
Index: cfe/trunk/test/Import/cxx-default-init-expr/Inputs/S.cpp
===================================================================
--- cfe/trunk/test/Import/cxx-default-init-expr/Inputs/S.cpp
+++ cfe/trunk/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: cfe/trunk/test/Import/cxx-default-init-expr/test.cpp
===================================================================
--- cfe/trunk/test/Import/cxx-default-init-expr/test.cpp
+++ cfe/trunk/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;
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50732.160967.patch
Type: text/x-patch
Size: 1219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180816/a39d99d6/attachment.bin>
More information about the cfe-commits
mailing list