Skip to content

Commit 2b9aeda

Browse files
committed
Test using _0 as an identifier for nameless fields
Fixes #1225. Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 29c6eb5 commit 2b9aeda

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

tests/Common/Common.h

+22-1
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,27 @@ typedef const char* LPCSTR;
15551555
DLL_API LPCSTR TakeTypedefedMappedType(LPCSTR string);
15561556
DLL_API std::string UTF8;
15571557

1558+
typedef enum SE4IpAddr_Tag {
1559+
V4,
1560+
V6,
1561+
} SE4IpAddr_Tag;
1562+
1563+
typedef struct {
1564+
uint8_t _0[4];
1565+
} SE4V4_Body;
1566+
1567+
typedef struct {
1568+
uint8_t _0[16];
1569+
} SE4V6_Body;
1570+
1571+
typedef struct {
1572+
SE4IpAddr_Tag tag;
1573+
union {
1574+
SE4V4_Body v4;
1575+
SE4V6_Body v6;
1576+
};
1577+
} SE4IpAddr;
1578+
15581579
struct DLL_API StructWithCopyCtor
15591580
{
15601581
StructWithCopyCtor();
@@ -1619,4 +1640,4 @@ void DLL_API PointerToTypedefPointerTestMethod(LPPointerToTypedefPointerTest* lp
16191640

16201641
typedef int *LPINT;
16211642

1622-
void DLL_API PointerToPrimitiveTypedefPointerTestMethod(LPINT lp, int valToSet);
1643+
void DLL_API PointerToPrimitiveTypedefPointerTestMethod(LPINT lp, int valToSet);

0 commit comments

Comments
 (0)