[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / invalid-cast.cpp
blob5c77aaf4cf90d61127a520e25719d84b70fe3378
1 // RUN: %clang_cc1 -verify -fsyntax-only %s
2 // expected-no-diagnostics
3 // This previously triggered an assertion failure.
4 template<class T>
5 struct X {
6 T array;
7 };
9 int foo(X<int[1]> x0) {
10 return x0.array[17];