[PATCH] D41736: make attribute instantiation instantiate all attributes

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 11:13:21 PST 2018

rsmith created this revision.
rsmith added reviewers: aaron.ballman, erichkeane.
rsmith added a project: clang.
Herald added a subscriber: sanjoy.

Attribute instantiation would previously default to instantiating each kind of attribute only once. This was overridden by a flag whose intended purpose was to permit attributes from a prior declaration to be inherited onto a new declaration even if that new declaration had its own copy of the attribute. This appears to be the wrong behavior: when instantiating attributes from a template, we should always instantiate all the attributes that were written on that template.

This patch renames the flag in the Attr class (and TableGen sources) to more clearly identify what it's actually for, and removes the usage of the flag from template instantiation. I also removed the flag from AlignedAttr, which was only added to work around the seemingly-incorrect suppression of duplicate attribute instantiation.

  rC Clang



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41736.128634.patch
Type: text/x-patch
Size: 13814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180104/f3094b6c/attachment.bin>

More information about the cfe-commits mailing list