]> granicus.if.org Git - clang/commitdiff
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339831 91177308-0d34-0410-b5e6-96231b3b80d8

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

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 (file)
index 0000000..bf80439
--- /dev/null
@@ -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 (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;
+}