[ASTImporter] Add test for ArrayInitLoopExpr
authorRaphael Isemann <teemperor@gmail.com>
Wed, 15 Aug 2018 22:52:21 +0000 (22:52 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Wed, 15 Aug 2018 22:52:21 +0000 (22:52 +0000)
Reviewers: a.sidorin, a_sidorin

Reviewed By: a_sidorin

Subscribers: martong, cfe-commits

Differential Revision: https://reviews.llvm.org/D50733

llvm-svn: 339831

clang/test/Import/array-init-loop-expr/Inputs/S.cpp [new file with mode: 0644]
clang/test/Import/array-init-loop-expr/test.cpp [new file with mode: 0644]

diff --git a/clang/test/Import/array-init-loop-expr/Inputs/S.cpp b/clang/test/Import/array-init-loop-expr/Inputs/S.cpp
new file mode 100644 (file)
index 0000000..bf80439
--- /dev/null
@@ -0,0 +1,3 @@
+class S {
+  int a[10];
+};
diff --git a/clang/test/Import/array-init-loop-expr/test.cpp b/clang/test/Import/array-init-loop-expr/test.cpp
new file mode 100644 (file)
index 0000000..ac12ecc
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s
+// CHECK: CXXCtorInitializer
+// CHECK-NEXT: ArrayInitLoopExpr
+// CHECK-SAME: 'int [10]'
+
+// CHECK: ArrayInitIndexExpr
+
+void expr() {
+  S s;
+  S copy = s;
+}