summaryrefslogtreecommitdiff
path: root/test/AST
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2018-12-02 16:36:23 +0000
committerStephen Kelly <steveire@gmail.com>2018-12-02 16:36:23 +0000
commit7b954aa8b885e87b8a95738c9545e3e32dd31a13 (patch)
tree7bc3bd0e37f0825221082d51f6770f05bc83b608 /test/AST
parent938b65e725c6e0a48111f45c8378b575790c9184 (diff)
downloadclang-7b954aa8b885e87b8a95738c9545e3e32dd31a13.tar.gz
Add dump tests for ArrayInitLoopExpr and ArrayInitIndexExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/AST')
-rw-r--r--test/AST/ast-dump-array.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/AST/ast-dump-array.cpp b/test/AST/ast-dump-array.cpp
new file mode 100644
index 0000000000..303b86b0d3
--- /dev/null
+++ b/test/AST/ast-dump-array.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s | FileCheck -strict-whitespace %s
+
+void testArrayInitExpr()
+{
+ int a[10];
+ auto l = [a]{
+ };
+ // CHECK: |-ArrayInitLoopExpr 0x{{[^ ]*}} <col:15> 'int [10]'
+ // CHECK: | `-ArrayInitIndexExpr 0x{{[^ ]*}} <<invalid sloc>> 'unsigned long'
+}