1 // Test this without pch.
2 // RUN: %clang_cc1 -std=c++11 -include %S/cxx-variadic-templates.h -verify %s -ast-dump -o -
3 // RUN: %clang_cc1 -std=c++11 -include %S/cxx-variadic-templates.h %s -emit-llvm -o - | FileCheck %s
4 
5 // Test with pch.
6 // RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -o %t %S/cxx-variadic-templates.h
7 // RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s -ast-dump  -o -
8 // RUN: %clang_cc1 -std=c++11 -include-pch %t %s -emit-llvm -o - | FileCheck %s
9 
10 // RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -fpch-instantiate-templates -o %t %S/cxx-variadic-templates.h
11 // RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s -ast-dump  -o -
12 // RUN: %clang_cc1 -std=c++11 -include-pch %t %s -emit-llvm -o - | FileCheck %s
13 
14 // expected-no-diagnostics
15 
16 // CHECK: allocate_shared
17 shared_ptr<int> spi = shared_ptr<int>::allocate_shared(1, 2);
18 
19 template<int> struct A {};
20 template<int> struct B {};
21 outer<int, int>::inner<1, 2, A, B> i(A<1>{}, B<2>{});
22 
test_nondependent_pack()23 void test_nondependent_pack() {
24   take_nondependent_pack<int, int>(nullptr, nullptr);
25   take_nondependent_pack_2<int, int>({});
26 }
27