26 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -Warray-parameter -verify %s2 3template <int N>4void func(int i[10]); // expected-note {{previously declared as 'int[10]' here}}5 6template <int N>7void func(int i[N]); // expected-warning {{argument 'i' of type 'int[N]' with mismatched bound}}8 9template <int N>10void func(int (&Val)[N]);11 12template <>13void func<10>(int (&Val)[10]) {14}15 16static constexpr int Extent = 10;17void funk(int i[10]);18void funk(int i[Extent]); // no-warning19 20template<int K>21struct T {22 static void F(int a[8 * K]);23};24template<int K>25void T<K>::F(int a[8 * K]) {} // no-warning26