[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / gh37257.cpp
blobebcd32d18f69da2409d096b4822128d30f9bb532
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 template<class T>
4 T&& create();
6 template<class T, class... Args>
7 void test() {
8 T t(create<Args>()...); // expected-error{{variable has incomplete type 'int[]'}}
9 (void) t;
12 struct A;
14 int main() {
15 test<int[]>(); // expected-note {{in instantiation of function template specialization 'test<int[]>' requested here}}