xoofx/CppAst.NET

Empty field name for anonymous union with defined field name

TechInterMezzo opened this issue · 1 comments

Referencing my comment from the last issue: #66 (comment)

struct STRUCTURE
{
  unsigned long long u64GUID;
  unsigned long long u64OwnerGUID;
  unsigned int u32Flags;
  unsigned int u32RefCount;

  union
  {
    void* stLinkListNode;
    void* stTreeNode;
  } stStorage;

};

Although the union has a field named "stStorage" an unnamed field gets listed right before "stStorage" having the same union as field type.

There is a regression with the fix for that bug. As I would expect there is one field now instead of two. But this time I get an unnamed field instead of one named "stStorage".

xoofx commented

Ah! That was an oversight. I wanted to fix it in the test and forgot. Fixed by commit 0095344, 0.9.4 on its way.