[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / cxx-variadic-templates-with-default-params.cpp
blobdfa10df99fe75213aeb60841c530f9525ef9e15d
1 // Test this without pch.
2 // RUN: %clang_cc1 -std=c++11 -include %s -fsyntax-only -verify %s
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
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
11 // expected-no-diagnostics
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;
20 template<unsigned T, unsigned... U>
21 class dummy {
22 int field[T];
24 #else
25 void f() {
26 dummy<> x;
27 (void)x;
29 #endif