]> granicus.if.org Git - clang/commitdiff
Add dump tests for ArrayInitLoopExpr and ArrayInitIndexExpr
authorStephen Kelly <steveire@gmail.com>
Sun, 2 Dec 2018 16:36:23 +0000 (16:36 +0000)
committerStephen Kelly <steveire@gmail.com>
Sun, 2 Dec 2018 16:36:23 +0000 (16:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348093 91177308-0d34-0410-b5e6-96231b3b80d8

test/AST/ast-dump-array.cpp [new file with mode: 0644]

diff --git a/test/AST/ast-dump-array.cpp b/test/AST/ast-dump-array.cpp
new file mode 100644 (file)
index 0000000..303b86b
--- /dev/null
@@ -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'
+}