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