1 // Test this without pch.
2 // RUN: %clang_cc1 -std=c++11 -include %s -fsyntax-only -verify %s
3 
4 // Test with pch.
5 // RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -o %t %s
6 // RUN: %clang_cc1 -std=c++11 -include-pch %t -fsyntax-only -verify %s
7 
8 // RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -fpch-instantiate-templates -o %t %s
9 // RUN: %clang_cc1 -std=c++11 -include-pch %t -fsyntax-only -verify %s
10 
11 // expected-no-diagnostics
12 
13 // PR25271: Ensure that default template arguments prior to a parameter pack
14 // successfully round-trip.
15 #ifndef HEADER
16 #define HEADER
17 template<unsigned T=123, unsigned... U>
18 class dummy;
19 
20 template<unsigned T, unsigned... U>
21 class dummy {
22     int field[T];
23 };
24 #else
f()25 void f() {
26     dummy<> x;
27     (void)x;
28 }
29 #endif
30