xref: /minix3/external/bsd/llvm/dist/clang/test/Modules/Inputs/cxx-irgen-left.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc #include "cxx-irgen-top.h"
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc S<int> s;
4*0a6a1f1dSLionel Sambuc 
instantiate_min()5*0a6a1f1dSLionel Sambuc inline int instantiate_min() {
6*0a6a1f1dSLionel Sambuc   return min(1, 2);
7*0a6a1f1dSLionel Sambuc }
8*0a6a1f1dSLionel Sambuc 
9*0a6a1f1dSLionel Sambuc inline int instantiate_CtorInit(CtorInit<int> i = CtorInit<int>()) {
10*0a6a1f1dSLionel Sambuc   return i.a;
11*0a6a1f1dSLionel Sambuc }
12*0a6a1f1dSLionel Sambuc 
13*0a6a1f1dSLionel Sambuc namespace ImplicitSpecialMembers {
create_left()14*0a6a1f1dSLionel Sambuc   inline void create_left() {
15*0a6a1f1dSLionel Sambuc     // Trigger declaration, but not definition, of special members.
16*0a6a1f1dSLionel Sambuc     B b(0); C c(0); D d(0);
17*0a6a1f1dSLionel Sambuc     // Trigger definition of copy constructor.
18*0a6a1f1dSLionel Sambuc     C c2(c); D d2(d);
19*0a6a1f1dSLionel Sambuc   }
20*0a6a1f1dSLionel Sambuc }
21*0a6a1f1dSLionel Sambuc 
22*0a6a1f1dSLionel Sambuc namespace OperatorDeleteLookup {
23*0a6a1f1dSLionel Sambuc   // Trigger definition of A::~A() and lookup of operator delete.
24*0a6a1f1dSLionel Sambuc   // Likewise for B<int>::~B().
f()25*0a6a1f1dSLionel Sambuc   inline void f() { A a; B<int> b; }
26*0a6a1f1dSLionel Sambuc }
27