clang/test/SemaCXX/gh37257.cpp
raw| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | template<class T> |
| 4 | T&& create(); |
| 5 | |
| 6 | template<class T, class... Args> |
| 7 | void test() { |
| 8 | T t(create<Args>()...); // expected-error{{variable has incomplete type 'int[]'}} |
| 9 | (void) t; |
| 10 | } |
| 11 | |
| 12 | struct A; |
| 13 | |
| 14 | int main() { |
| 15 | test<int[]>(); // expected-note {{in instantiation of function template specialization 'test<int[]>' requested here}} |
| 16 | } |