brintos

brintos / llvm-project-archived public Read only

0
0
Text · 752 B · dfa10df Raw
30 lines · cpp
1// Test this without pch.2// RUN: %clang_cc1 -std=c++11 -include %s -fsyntax-only -verify %s3 4// Test with pch.5// RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -o %t %s6// RUN: %clang_cc1 -std=c++11 -include-pch %t -fsyntax-only -verify %s7 8// RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -fpch-instantiate-templates -o %t %s9// RUN: %clang_cc1 -std=c++11 -include-pch %t -fsyntax-only -verify %s10 11// expected-no-diagnostics12 13// PR25271: Ensure that default template arguments prior to a parameter pack14// successfully round-trip.15#ifndef HEADER16#define HEADER17template<unsigned T=123, unsigned... U>18class dummy;19 20template<unsigned T, unsigned... U>21class dummy {22    int field[T];23};24#else25void f() {26    dummy<> x;27    (void)x;28}29#endif30