[cfe-commits] [PATCH][Review request] - Anonymous union/struct redesign

Francois Pichet pichet2000 at gmail.com
Sat Nov 20 21:25:00 PST 2010


hi here is patch 3.. hoping this is the good one.

On Sat, Nov 20, 2010 at 7:18 PM, John McCall <rjmccall at apple.com> wrote:
>>
>> Accessor to get the base declaration for what? I didn't feel the need of it.
>
> I mean the first declaration, i.e. the thing that makes this equivalent to either a variable or a field.  But if you haven't seen much use for this, then let's keep the interface simple for now.

I added that Accessor  after all.

On Sat, Nov 20, 2010 at 7:18 PM, John McCall <rjmccall at apple.com> wrote:
>>> +VarDecl *Sema::BuildAnonymousStructUnionMemberPath(IndirectFieldDecl *Field,
>>>                                    llvm::SmallVectorImpl<FieldDecl *> &Path) {
>>>
>>> I'm not convinced this method needs to exist anymore, but if it does:
>>
>> Why not? this function is called at 2 places. That code shall not be duplicated.
>> <anonymous2.patch>
>
> This function doesn't do useful work anymore.  It used to be useful because the
> path wasn't explicit in the AST, but now its callers can just iterate over the path
> in the IndirectFieldDecl instead of copying that out into a vector and iterating
> over that.  In fact, all of its callers should already know by context whether the
> base declaration is a field or a variable.

ok function now removed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anonymous3.patch
Type: application/octet-stream
Size: 30374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101121/32037d86/attachment.obj>


More information about the cfe-commits mailing list