summaryrefslogtreecommitdiff
path: root/test/Import/array-init-loop-expr
diff options
context:
space:
mode:
Diffstat (limited to 'test/Import/array-init-loop-expr')
-rw-r--r--test/Import/array-init-loop-expr/Inputs/S.cpp8
-rw-r--r--test/Import/array-init-loop-expr/test.cpp10
2 files changed, 18 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 0000000000000..5ca3ad47b278f
--- /dev/null
+++ b/test/Import/array-init-loop-expr/Inputs/S.cpp
@@ -0,0 +1,8 @@
+class S {
+ int a[10];
+};
+
+void f() {
+ S s;
+ S copy = s;
+}
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 0000000000000..7fe109c305ddd
--- /dev/null
+++ b/test/Import/array-init-loop-expr/test.cpp
@@ -0,0 +1,10 @@
+// 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() {
+ f();
+}