From df6c8360ca465c84d5e84bb346465848bf80e816 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Wed, 15 Aug 2018 22:52:21 +0000 Subject: [PATCH] [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 --- test/Import/array-init-loop-expr/Inputs/S.cpp | 3 +++ test/Import/array-init-loop-expr/test.cpp | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/Import/array-init-loop-expr/Inputs/S.cpp create mode 100644 test/Import/array-init-loop-expr/test.cpp 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; +} -- 2.50.1