summaryrefslogtreecommitdiff
path: root/test/Import
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2018-08-15 22:52:21 +0000
committerRaphael Isemann <teemperor@gmail.com>2018-08-15 22:52:21 +0000
commitdf6c8360ca465c84d5e84bb346465848bf80e816 (patch)
treeb9e2d21fd6fed2ef3d5e88f39cfc795a30dcd8e3 /test/Import
parent59a92a4aa354eee24286570e16b933ec9841951e (diff)
downloadclang-df6c8360ca465c84d5e84bb346465848bf80e816.tar.gz
[ASTImporter] Add test for ArrayInitLoopExpr
Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50733 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Import')
-rw-r--r--test/Import/array-init-loop-expr/Inputs/S.cpp3
-rw-r--r--test/Import/array-init-loop-expr/test.cpp11
2 files changed, 14 insertions, 0 deletions
diff --git a/test/Import/array-init-loop-expr/Inputs/S.cpp b/test/Import/array-init-loop-expr/Inputs/S.cpp
new file mode 100644
index 0000000000..bf80439834
--- /dev/null
+++ b/test/Import/array-init-loop-expr/Inputs/S.cpp
@@ -0,0 +1,3 @@
+class S {
+ int a[10];
+};
diff --git a/test/Import/array-init-loop-expr/test.cpp b/test/Import/array-init-loop-expr/test.cpp
new file mode 100644
index 0000000000..ac12ecc036
--- /dev/null
+++ b/test/Import/array-init-loop-expr/test.cpp
@@ -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;
+}