Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Modules / Inputs / templates-left.h
blob4f7abeef1fa061b640dbee158f94c17c97f23be2
1 @import templates_top;
3 template<typename T> class Vector;
5 template<typename T> class Vector;
7 template<typename T> class List;
8 template<> class List<bool> {
9 public:
10 void push_back(int);
12 namespace N {
13 template<typename T> class Set;
15 namespace N {
16 template<typename T> class Set {
17 public:
18 void insert(T);
22 constexpr unsigned List<int>::*size_left = &List<int>::size;
23 List<int> list_left = { 0, 8 };
24 typedef List<int> ListInt_left;
26 template <typename T>
27 void pendingInstantiationEmit(T) {}
28 void triggerPendingInstantiation() {
29 pendingInstantiationEmit(12);
30 pendingInstantiationEmit(42.);
33 void redeclDefinitionEmit(){}
35 typedef Outer<int>::Inner OuterIntInner_left;
37 int defineListDoubleLeft() {
38 List<double> ld;
39 ld.push_back(0.0);
40 return ld.size;
43 template<typename T> struct MergePatternDecl;
45 extern template struct ExplicitInstantiation<false, false>;
46 extern template struct ExplicitInstantiation<false, true>;
47 extern template struct ExplicitInstantiation<true, false>;
48 extern template struct ExplicitInstantiation<true, true>;
50 void useExplicitInstantiation() {
51 ExplicitInstantiation<true, false>().f();
52 ExplicitInstantiation<true, true>().f();
55 template<typename> struct DelayUpdates;
56 template<> struct DelayUpdates<int>;
57 template<typename T> struct DelayUpdates<T*>;
58 template<typename T> void testDelayUpdates(DelayUpdates<T> *p = 0) {}
60 void outOfLineInlineUseLeftF(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::f);
61 void outOfLineInlineUseLeftG(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::g);
62 void outOfLineInlineUseLeftH(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::h);
64 namespace EmitDefaultedSpecialMembers {
65 inline void f() {
66 SmallString<256> SS;
70 inline int *getStaticDataMemberLeft() {
71 return WithUndefinedStaticDataMember<int[]>::undefined;
74 inline WithAttributes<int> make_with_attributes_left() { return WithAttributes<int>(); }