2020-06-21 20:35:15 +08:00
|
|
|
// Test without serialization:
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s \
|
|
|
|
// RUN: | FileCheck --strict-whitespace %s
|
|
|
|
//
|
|
|
|
// Test with serialization:
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t %s
|
|
|
|
// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -include-pch %t -ast-dump-all /dev/null \
|
|
|
|
// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
|
|
|
|
// RUN: | FileCheck --strict-whitespace %s
|
2018-12-03 00:36:23 +08:00
|
|
|
|
|
|
|
void testArrayInitExpr()
|
|
|
|
{
|
|
|
|
int a[10];
|
|
|
|
auto l = [a]{
|
|
|
|
};
|
2021-10-15 05:48:17 +08:00
|
|
|
// CHECK: |-ArrayInitLoopExpr 0x{{[^ ]*}} <col:15> 'int [10]'
|
2018-12-03 00:42:34 +08:00
|
|
|
// CHECK: | `-ArrayInitIndexExpr 0x{{[^ ]*}} <<invalid sloc>> 'unsigned long'
|
2018-12-03 00:36:23 +08:00
|
|
|
}
|
2018-12-04 17:53:36 +08:00
|
|
|
|
|
|
|
template<typename T, int Size>
|
|
|
|
class array {
|
|
|
|
T data[Size];
|
|
|
|
|
|
|
|
using array_T_size = T[Size];
|
2021-10-15 05:48:17 +08:00
|
|
|
// CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'T [Size]' dependent <col:25, col:30>
|
2021-09-16 04:37:24 +08:00
|
|
|
using const_array_T_size = const T[Size];
|
2021-10-15 05:48:17 +08:00
|
|
|
// CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'const T [Size]' dependent <col:37, col:42>
|
2018-12-04 17:53:36 +08:00
|
|
|
};
|