xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/invalid-cast.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -verify -fsyntax-only %s
2*f4a2713aSLionel Sambuc // expected-no-diagnostics
3*f4a2713aSLionel Sambuc // <rdar://problem/13153516> - This previously triggered an assertion failure.
4*f4a2713aSLionel Sambuc template<class T>
5*f4a2713aSLionel Sambuc struct X {
6*f4a2713aSLionel Sambuc  T array;
7*f4a2713aSLionel Sambuc };
8*f4a2713aSLionel Sambuc 
foo(X<int[1]> x0)9*f4a2713aSLionel Sambuc int foo(X<int[1]> x0) {
10*f4a2713aSLionel Sambuc  return x0.array[17];
11*f4a2713aSLionel Sambuc }
12