[cfe-commits] [PATCH][MS][Review request] - Microsoft C anonymous struct

John McCall rjmccall at apple.com
Mon Nov 22 02:06:13 PST 2010


On Nov 21, 2010, at 5:02 PM, Francois Pichet wrote:
> Now that the general anonymous union/struct redesign is done
> (semainit.cpp to come later), here is an updated ms anonymous struct
> patch.

Hmm.  I think we can simplify the InjectAnonymousStructOrUnionMembers logic a little, and then we wouldn't need the new parameter or, indeed, for it to be recursive at all.  All you need to do is look for both FieldDecls *and* InjectedFieldDecls when walking the record.  That way we don't have to re-derive whether a particular anonymous field causes an injection — we just ignore anonymous fields and forward anything which might already have been injected.

Also, there are tabs in test/Sema/MicrosoftExtensions.c.

Otherwise, looks good.

John.



More information about the cfe-commits mailing list