[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / PCH / cxx11-inheriting-ctors.cpp
blob6229fb40f7a5eb031beb28137ec7ea314ead7885
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
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
20 // expected-no-diagnostics
22 #ifndef HEADER1
23 #define HEADER1
25 struct Base {
26 Base(int) {}
28 template <typename T>
29 Base(T) {}
32 struct Test : Base {
33 using Base::Base;
36 template <typename T>
37 struct Test2 : Base {
38 using Base::Base;
41 template <typename B>
42 struct Test3 : B {
43 using B::B;
46 #elif !defined(HEADER2)
47 #define HEADER2
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);
56 #pragma clang __debug dump Test
57 #pragma clang __debug dump Test2
59 #else
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);
68 #endif