Home | History | Annotate | Download | only in PCH
      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 // expected-no-diagnostics
      9 
     10 // PR25271: Ensure that default template arguments prior to a parameter pack
     11 // successfully round-trip.
     12 #ifndef HEADER
     13 #define HEADER
     14 template<unsigned T=123, unsigned... U>
     15 class dummy;
     16 
     17 template<unsigned T, unsigned... U>
     18 class dummy {
     19     int field[T];
     20 };
     21 #else
     22 void f() {
     23     dummy<> x;
     24     (void)x;
     25 }
     26 #endif
     27