[PATCH] Consistency for type_tag_for_datatype subject

Aaron Ballman aaron at aaronballman.com
Mon Nov 25 10:55:20 PST 2013


Thanks! Committed with your recommendations in r195675.

~Aaron

On Sun, Nov 24, 2013 at 6:23 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> On Sun, Nov 24, 2013 at 2:18 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
>> Attr.td claims that type_tag_for_datatype only applies to VarDecl
>> subjects, but SemaDeclAttr.cpp was not checking for any subject
>> whatsoever. This patch makes SemaDeclAttr.cpp check for the proper
>> subject, and adds a testcase for it. However, since I couldn't find
>> documentation on this attribute, I wasn't certain whether this was the
>> correct approach, or whether Attr.td had the incorrect subject.
>
> Hello,
>
> Indeed, seems like I failed to check this in the implementation.
>
> Please make this an error, move the test to line 60 and name the test
> datatype_wrong7.  LGTM with that.
>
> About documentation: I have put some documentation into
> docs/LanguageExtensions.rst, but it does not explicitly say that the
> attribute only applies to variables, though, I think, it implies this.
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list