blob: c069a35c7b9c80ffed40fa337bf3221448139201 [file] [log] [blame]
Zachary Turnera54b7dd2015-02-22 06:47:32 +00001// Compile with "cl /c /Zi /GR- symbolformat.cpp"
2// Compile symbolformat-fpo.cpp (see file for instructions)
3// Link with "link symbolformat.obj symbolformat-fpo.obj /debug /nodefaultlib
4// /entry:main /out:symbolformat.exe"
5
6int __cdecl _purecall(void) { return 0; }
7
Zachary Turner29c69102015-02-23 05:58:34 +00008enum TestEnum {
9 Value,
10 Value10 = 10
11};
12
13enum class TestEnumClass {
14 Value,
15 Value10 = 10
16};
17
Zachary Turnera54b7dd2015-02-22 06:47:32 +000018struct A {
19 virtual void PureFunc() = 0 {}
20 virtual void VirtualFunc() {}
21 void RegularFunc() {}
22};
23
Zachary Turner29c69102015-02-23 05:58:34 +000024struct VirtualBase {
Zachary Turnera54b7dd2015-02-22 06:47:32 +000025};
26
Zachary Turner29c69102015-02-23 05:58:34 +000027struct B : public A, protected virtual VirtualBase {
28 void PureFunc() override {}
29
30 enum NestedEnum {
31 FirstVal,
32 SecondVal
33 };
34
35 typedef int NestedTypedef;
36 NestedEnum EnumVar;
37 NestedTypedef TypedefVar;
38};
39
40typedef int IntType;
41typedef A ClassAType;
42
Zachary Turnera54b7dd2015-02-22 06:47:32 +000043int main(int argc, char **argv) {
44 B b;
45 auto PureAddr = &B::PureFunc;
46 auto VirtualAddr = &A::PureFunc;
47 auto RegularAddr = &A::RegularFunc;
Zachary Turner29c69102015-02-23 05:58:34 +000048 TestEnum Enum = Value;
49 TestEnumClass EnumClass = TestEnumClass::Value10;
50 IntType Int = 12;
51 ClassAType *ClassA = &b;
Zachary Turnera54b7dd2015-02-22 06:47:32 +000052 return 0;
53}