1 // RUN: %clang_cc1 -std=c++11 -include %s -include %s -verify %s
2 //
3 // Emit with definitions in the declaration:
4 // RxN: %clang_cc1 -std=c++11 -emit-pch -o %t.12 -include %s %s
5 // RxN: %clang_cc1 -std=c++11 -include-pch %t.12 -verify %s
6 //
7 // RxN: %clang_cc1 -std=c++11 -emit-pch -fpch-instantiate-templates -o %t.12 -include %s %s
8 // RxN: %clang_cc1 -std=c++11 -include-pch %t.12 -verify %s
9 //
10 // Emit with definitions in update records:
11 // RxN: %clang_cc1 -std=c++11 -emit-pch -o %t.1 %s
12 // RxN: %clang_cc1 -std=c++11 -include-pch %t.1 -emit-pch -o %t.2 -verify %s
13 // RxN: %clang_cc1 -std=c++11 -include-pch %t.1 -include-pch %t.2 -verify %s
14 //
15 // RxN: %clang_cc1 -std=c++11 -emit-pch -fpch-instantiate-templates -o %t.1 %s
16 // RxN: %clang_cc1 -std=c++11 -include-pch %t.1 -emit-pch -fpch-instantiate-templates -o %t.2 -verify %s
17 // RxN: %clang_cc1 -std=c++11 -include-pch %t.1 -include-pch %t.2 -verify %s
18 
19 
20 // expected-no-diagnostics
21 
22 #ifndef HEADER1
23 #define HEADER1
24 
25 struct Base {
BaseBase26   Base(int) {}
27 
28   template <typename T>
BaseBase29   Base(T) {}
30 };
31 
32 struct Test : Base {
33   using Base::Base;
34 };
35 
36 template <typename T>
37 struct Test2 : Base {
38   using Base::Base;
39 };
40 
41 template <typename B>
42 struct Test3 : B {
43   using B::B;
44 };
45 
46 #elif !defined(HEADER2)
47 #define HEADER2
48 
49 Test test1a(42);
50 Test test1b(nullptr);
51 Test2<int> test2a(42);
52 Test2<int> test2b(nullptr);
53 Test3<Base> test3a(42);
54 Test3<Base> test3b(nullptr);
55 
56 #pragma clang __debug dump Test
57 #pragma clang __debug dump Test2
58 
59 #else
60 
61 Test retest1a(42);
62 Test retest1b(nullptr);
63 Test2<int> retest2a(42);
64 Test2<int> retest2b(nullptr);
65 Test3<Base> retest3a(42);
66 Test3<Base> retest3b(nullptr);
67 
68 #endif
69