From: Raphael Isemann Date: Wed, 15 Aug 2018 22:52:21 +0000 (+0000) Subject: [ASTImporter] Add test for ArrayInitLoopExpr X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df6c8360ca465c84d5e84bb346465848bf80e816;p=clang [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 --- 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; +}