1 // To avoid linking MSVC specific libs, we don't test virtual/override methods
2 // that needs vftable support in this file.
5 enum Enum
{ RED
, GREEN
, BLUE
};
12 int Line
: 16; // Test named bitfield.
13 short : 8; // Unnamed bitfield symbol won't be generated in PDB.
20 typedef Struct StructTypedef
;
24 unsigned char UCharVar
;
26 long long LongLongVar
;
27 Enum EnumVar
; // Test struct has UDT member.
30 struct Struct StructVar
;
32 struct _List
; // Forward declaration.
34 struct _List
*array
[90];
35 struct { // Test unnamed struct. MSVC treats it as `int x`
38 union { // Test unnamed union. MSVC treats it as `int a; float b;`
45 struct _List
{ // Test doubly linked list.
46 struct _List
*current
;
47 struct _List
*previous
;
54 } UnnamedStruct
; // Test unnamed typedef-ed struct.
55 UnnamedStruct UnnanmedVar
;
58 namespace MemberTest
{
65 int Get() { return 0; }
74 class Class
: public Base
{ // Test base class.
76 static int m_static
; // Test static member variable.
78 Class() : m_public(), m_private(), m_protected() {}
79 explicit Class(int a
) { m_public
= a
; } // Test first reference of m_public.
82 static int StaticMemberFunc(int a
, ...) {
84 } // Test static member function.
85 int Get() { return 1; }
86 int f(Friend c
) { return c
.f(); }
87 inline bool operator==(const Class
&rhs
) const // Test operator.
89 return (m_public
== rhs
.m_public
);
94 struct Struct m_struct
;
104 } // namespace MemberTest
109 // Create instance of C1 so that it has debug info (due to constructor
111 MemberTest::Class C1
;
112 MemberTest::Class::StaticMemberFunc(1, 10, 2);