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

Francois Pichet pichet2000 at gmail.com
Mon Nov 22 21:44:12 PST 2010


On Mon, Nov 22, 2010 at 5:06 AM, John McCall <rjmccall at apple.com> wrote:
> 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.

Hi thank you for the quick review.
Here is patch 2.
I removed the recursion in InjectAnonymousStructOrUnionMembers .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ms-anon.patch
Type: application/octet-stream
Size: 14795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101123/f59f24ba/attachment.obj>


More information about the cfe-commits mailing list