Zachary Turner | a54b7dd | 2015-02-22 06:47:32 +0000 | [diff] [blame] | 1 | // 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 | |
| 6 | int __cdecl _purecall(void) { return 0; } |
| 7 | |
Zachary Turner | 29c6910 | 2015-02-23 05:58:34 +0000 | [diff] [blame^] | 8 | enum TestEnum { |
| 9 | Value, |
| 10 | Value10 = 10 |
| 11 | }; |
| 12 | |
| 13 | enum class TestEnumClass { |
| 14 | Value, |
| 15 | Value10 = 10 |
| 16 | }; |
| 17 | |
Zachary Turner | a54b7dd | 2015-02-22 06:47:32 +0000 | [diff] [blame] | 18 | struct A { |
| 19 | virtual void PureFunc() = 0 {} |
| 20 | virtual void VirtualFunc() {} |
| 21 | void RegularFunc() {} |
| 22 | }; |
| 23 | |
Zachary Turner | 29c6910 | 2015-02-23 05:58:34 +0000 | [diff] [blame^] | 24 | struct VirtualBase { |
Zachary Turner | a54b7dd | 2015-02-22 06:47:32 +0000 | [diff] [blame] | 25 | }; |
| 26 | |
Zachary Turner | 29c6910 | 2015-02-23 05:58:34 +0000 | [diff] [blame^] | 27 | struct 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 | |
| 40 | typedef int IntType; |
| 41 | typedef A ClassAType; |
| 42 | |
Zachary Turner | a54b7dd | 2015-02-22 06:47:32 +0000 | [diff] [blame] | 43 | int main(int argc, char **argv) { |
| 44 | B b; |
| 45 | auto PureAddr = &B::PureFunc; |
| 46 | auto VirtualAddr = &A::PureFunc; |
| 47 | auto RegularAddr = &A::RegularFunc; |
Zachary Turner | 29c6910 | 2015-02-23 05:58:34 +0000 | [diff] [blame^] | 48 | TestEnum Enum = Value; |
| 49 | TestEnumClass EnumClass = TestEnumClass::Value10; |
| 50 | IntType Int = 12; |
| 51 | ClassAType *ClassA = &b; |
Zachary Turner | a54b7dd | 2015-02-22 06:47:32 +0000 | [diff] [blame] | 52 | return 0; |
| 53 | } |