Files
clang-p2996/llvm/test/tools/llvm-pdbutil/Inputs/PrettyFuncDumperTest.cpp
Nico Weber c9c55cf89b Rename llvm/test/tools/llvm-pdbdump to llvm/test/tools/llvm-pdbutil
llvm-pdbdump was renamed to llvm-pdbutil long ago. This updates the test
to be where you'd expect them to be.

llvm-svn: 365515
2019-07-09 17:14:24 +00:00

50 lines
914 B
C++

// Compile for x86 (FPO disabled)
// Compile with "cl /c /Zi /GR- PrettyFuncDumperTest.cpp"
// Link with "link PrettyFuncDumperTest.obj /debug /nodefaultlib /entry:main"
typedef void (*FuncPtrA)();
FuncPtrA FuncVarA;
typedef float (*FuncPtrB)(void);
FuncPtrB FuncVarB;
typedef int(*VariadicFuncPtrTypedef)(char, double, ...);
VariadicFuncPtrTypedef VariadicFuncVar;
void Func(int array[]) { return; }
template <int N=1, class ...T>
void TemplateFunc(T ...Arg) {
return;
}
namespace {
void Func(int& a, const double b, volatile bool c) { return; }
}
namespace NS {
void Func(char a, int b, ...) {
return;
}
}
namespace MemberFuncsTest {
class A {
public:
int FuncA() { return 1; }
void FuncB(int a, ...) {}
};
}
int main() {
MemberFuncsTest::A v1;
v1.FuncA();
v1.FuncB(9, 10, 20);
NS::Func('c', 2, 10, 100);
TemplateFunc(10);
TemplateFunc(10, 11, 88);
return 0;
}