1 // Build with "cl.exe /Zi /GR- /GX- every-type.cpp /link /debug /nodefaultlib /entry:main"
6 void __cdecl
operator delete(void *,unsigned int) {}
7 void __cdecl
operator delete(void *,unsigned __int64
) {}
9 struct FooStruct
{ }; // LF_STRUCTURE
11 class FooClass
{ // LF_CLASS
14 enum NestedEnum
{ // LF_ENUM
16 A
, B
, C
// LF_ENUMERATE
19 void RegularMethod() {} // LF_ARGLIST
23 void OverloadedMethod(int) {} // LF_METHODLIST
25 void OverloadedMethod(int, int) {}
27 int HiNibble
: 4; // LF_BITFIELD
29 NestedEnum EnumVariable
; // LF_MEMBER
30 static void *StaticMember
; // LF_POINTER
34 void *FooClass::StaticMember
= nullptr;
36 class Inherit
: public FooClass
{ // LF_BCLASS
38 virtual ~Inherit() {} // LF_VTSHAPE
42 class VInherit
: public virtual FooClass
{ // LF_VBCLASS
46 class IVInherit
: public VInherit
{ // LF_IVBCLASS
53 int SomeArray
[7] = {1, 2, 3, 4, 5, 6, 7}; // LF_ARRAY
56 void Reference(T
&t
) { }
58 const volatile FooStruct FS
; // LF_MODIFIER with struct
59 const volatile FooClass FC
; // LF_MODIFIER with class
60 const volatile TheUnion TU
; // LF_MODIFIER with union
61 const volatile FooClass::NestedEnum FCNE
= FooClass::A
; // LF_MODIFIER with enum
64 int main(int argc
, char **argv
) { // LF_PROCEDURE
65 const int X
= 7; // LF_MODIFIER
67 FooStruct FooStructInstance
;
68 FooClass FooClassInstance
;
69 Inherit InheritInstance
;
70 VInherit VInheritInstance
;
71 IVInherit IVInheritInstance
;
72 TheUnion UnionInstance
;
73 Reference(FS
); // LF_MODIFIER with struct
74 Reference(FC
); // LF_MODIFIER with class
75 Reference(TU
); // LF_MODIFIER with union
76 Reference(FCNE
); // LF_MODIFIER with enum
77 return SomeArray
[argc
];