Home | History | Annotate | Download | only in ltrace.minor
      1 #include<stddef.h>
      2 #include<iostream>
      3 #include<cstdlib>
      4 #include"demangle.h"
      5 
      6 /* Number of arguments */
      7 int Fi_i(int bar) 		{ return 0; }
      8 int Fi_s(short bar) 		{return 0; }
      9 int Fii_i(int bar, int goo) 	{ return 0; }
     10 int Fiii_i(int bar, int goo, int hoo) { return 0; }
     11 int Fie_i(int bar, ...) 	{ return 0; }
     12 
     13 /* Return types */
     14 void Fv_v(void) 		{ ; }
     15 char Fv_c(void) 		{ return 0; }
     16 signed char Fv_Sc(void) 	{ return 0; }
     17 unsigned char Fv_Uc(void) 	{ return 0; }
     18 short Fv_s(void) 		{ return 0; }
     19 unsigned short Fv_Us(void) 	{ return 0; }
     20 int Fv_i(void) 			{ return 0; }
     21 const int Fv_Ci(void) 		{ return 0; }
     22 unsigned int Fv_Ui(void) 	{ return 0; }
     23 volatile int Fv_Vi(void) 	{ return 0; }
     24 long Fv_l(void) 		{ return 0; }
     25 unsigned long Fv_Ul(void) 	{ return 0; }
     26 float Fv_f(void) 		{ return 0; }
     27 double Fv_g(void) 		{ return 0; }
     28 long double Fv_Lg(void) 	{ return 0; }
     29 
     30 /* Pointers */
     31 void *Fv_Pv(void) 		{ return 0; }
     32 void **Fv_PPv(void) 		{ return 0; }
     33 
     34 /* References */
     35 int& Fv_Ri(void) 		{ static int x; return x; }
     36 
     37 /* Argument types */
     38 int FPi_i(int *a) 		{ return 0; }
     39 int FA10_i_i(int a[10]) 	{ return 0; }
     40 int Fc_i(char bar) 		{ return 0; }
     41 int Ff_i(float bar) 		{ return 0; }
     42 int Fg_i(double bar) 		{ return 0; }
     43 
     44 /* Function pointers */
     45 typedef int (*x)(int);
     46 typedef int (*y)(short);
     47 
     48 int Fx_i(x fnptr) 		{ return 0; }
     49 int Fxx_i(x fnptr, x fnptr2) 	{ return 0; }
     50 int Fxxx_i(x fnptr, x fnptr2,
     51 	x fnptr3) 		{ return 0; }
     52 int Fxxi_i(x fnptr, x fnptr2,
     53 	x fnptr3, int i) 	{ return 0; }
     54 int Fxix_i(x fnptr, int i,
     55 	x fnptr3) 		{ return 0; }
     56 int Fxyxy_i(x fnptr, y fnptr2,
     57 	x fnptr3, y fnptr4) 	{ return 0; }
     58 
     59 /* Class methods */
     60 class myclass;
     61 myclass::myclass(void) 		{ myint = 0; }
     62 myclass::myclass(int x) 	{ myint = x; }
     63 myclass::~myclass() 		{ ; }
     64 
     65 int myclass::Fi_i(int bar) 	{ return myint; }
     66 int myclass::Fis_i(int bar) 	{ return bar; }
     67 
     68 void* myclass::operator new(size_t size)
     69 {
     70   void* p = malloc(size);return p;
     71 }
     72 void myclass::operator delete(void *p) {free(p);}
     73 
     74 myclass myclass::operator++() 	{ return myclass(++myint); }
     75 myclass myclass::operator++(int) { return myclass(myint++); }
     76 
     77 /* Binary */
     78 myclass myclass::operator+(int x) { return myclass(myint + x); }
     79 
     80 /* Assignment */
     81 myclass& myclass::operator=(const myclass& from)
     82 {
     83 	myint = from.myint;
     84 	return *this;
     85 }
     86 
     87 /* test clashes */
     88 class nested;
     89 
     90 nested::nested(void) 		{ ; }
     91 nested::~nested() 		{ ; }
     92 int nested::Fi_i(int bar) 	{ return bar; }
     93 
     94 void Fmyclass_v(myclass m) 	{ ; }
     95 void Fmxmx_v(myclass arg1, x arg2,
     96 	myclass arg3, x arg4) 	{ ; }
     97 
     98