[PATCH] Sema: When merging typedefs, handle records before merging attributes
Justin Bogner
mail at justinbogner.com
Mon Oct 7 16:13:33 PDT 2013
Richard Smith <richard at metafoo.co.uk> writes:
> On Mon, Oct 7, 2013 at 3:09 PM, Justin Bogner <mail at justinbogner.com> wrote:
>
> Richard Smith <richard at metafoo.co.uk> writes:
> > This doesn't look right in the case where the attribute is on a typedef
> > defined inside a class in C++. Instead, I think we should only perform
> the
> > merging if Old was a TypedefNameDecl.
>
> I think you meant to say "if old was a CXXRecordDecl"? This would mean I
> should put the [dcl.typedef] logic back where it was before and handle
> this separately. I think you're right.
>
> I meant what I said: we only want to merge attributes if the old declaration
> was also a typedef (that is, the redeclaration chain of typedefs has its own
> set of attributes that is independent of the attributes on the redeclaration
> chain for the record, and we shouldn't merge between them).
Ah, that makes way more sense. New patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Sema-Only-merge-typedef-attributes-if-the-previous-d.patch
Type: text/x-patch
Size: 3097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131007/19f4876f/attachment.bin>
More information about the cfe-commits
mailing list