ping?
anybody planning to review this?

On Sun, Dec 12, 2010 at 10:23 PM, Francois Pichet <[email protected]> wrote:
> More IndirectFieldDecl refactoring.
>
> This patch deals with a dark corner of clang: anonymous field
> initialized with designated-initializers (C99 feature)
> This is C++ mixing with C99.. not sure why clang supports that but it does.
>
> Example:
>
> struct Test {
>  union {
>      int a;
>      char b;
>  };
> };
>
> struct Test  var = { .a = 4 };
>
> Some explaining: currently designated anonymous fields are found via
> name look. Normal fields are found by iterating all the fields. This
> patch uses the fact that IndirectFieldDecl declarations will follow an
> anonymous implicit field to remove the special case of name lookup for
> anonymous field. With this patch there is no need to calculate the
> anonymous field position afterward. Clear enough?
>
> I also removed RecordDecl::getAnonymousStructOrUnionObject
> clang doesn't use it anymore since all anonymous fields handling is
> now done thought IndirectFieldDecl.
>

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to