]> granicus.if.org Git - clang/commitdiff
Extend test for DependentSizedArrayType
authorStephen Kelly <steveire@gmail.com>
Tue, 4 Dec 2018 09:53:36 +0000 (09:53 +0000)
committerStephen Kelly <steveire@gmail.com>
Tue, 4 Dec 2018 09:53:36 +0000 (09:53 +0000)
Use a using declaration to force the type to appear in the -ast-dump
output.

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

test/AST/ast-dump-array.cpp

index 64073bf224441505f61af985a1fcc0859e40b162..bfea13534a5d5caeb30627041682b5825d377f31 100644 (file)
@@ -8,3 +8,12 @@ void testArrayInitExpr()
     // CHECK: |-ArrayInitLoopExpr 0x{{[^ ]*}} <col:15> 'int [10]'
     // CHECK: |     `-ArrayInitIndexExpr 0x{{[^ ]*}} <<invalid sloc>> 'unsigned long'
 }
+
+template<typename T, int Size>
+class array {
+  T data[Size];
+
+  using array_T_size = T[Size];
+  // CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'T [Size]' dependent   <col:25, col:30>
+};
+