[PATCH] Attribute consistency

Aaron Ballman aaron at aaronballman.com
Wed Aug 28 16:16:55 PDT 2013


Going off the assumption that the declared behavior in Attr.td is
correct, I've switched the processing behavior in SemaDeclAttr.cpp to
match in r189532.  This has the least impact on the rest of the
system.  If there is fallout, it's easy enough to revert.
'
Thanks!

~Aaron

On Wed, Aug 28, 2013 at 6:21 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Mon, Aug 26, 2013 at 6:22 PM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
>>
>> This patch addresses some inconsistencies between inheritable and
>> non-inheritable attributes.  Currently, the CUDAHost and CUDADevice
>> attributes are specified as inheritable in Attr.td, but processed as
>> NonInheritable in SemaDeclAttr.cpp.  Similarly, Mode is specified as
>> NonInheritable in Attr.td but processed as Inheritable in
>> SemaDeclAttr.cpp.
>>
>> This patch makes the processing and the declaration consistent.
>> However, since I am not that familiar with CUDA or mode attributes, I
>> wanted to make sure I've not got things backwards or am
>> misunderstanding a design constraint.
>
>
> The "Mode" attribute shouldn't be inheritable; it only applies to a
> particular typedef declaration, not redeclarations of it.
>
>  I'm not sure about the CUDA attributes; if nobody chimes in, just do
> whatever seems appropriate.
>
> -Eli



More information about the cfe-commits mailing list