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 8 enum TestEnum { 9 Value, 10 Value10 = 10 11 }; 12 13 enum class TestEnumClass { 14 Value, 15 Value10 = 10 16 }; 17 18 struct A { 19 virtual void PureFunc() = 0 {} 20 virtual void VirtualFunc() {} 21 void RegularFunc() {} 22 }; 23 24 struct VirtualBase { 25 }; 26 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 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; 48 TestEnum Enum = Value; 49 TestEnumClass EnumClass = TestEnumClass::Value10; 50 IntType Int = 12; 51 ClassAType *ClassA = &b; 52 return 0; 53 } 54