On Wed, Aug 21, 2013 at 2:39 PM, Christian Wailes
<[email protected]> wrote:
> The tests that for making sure warnings are issued when attributes are
> attached to the wrong kind of thing aren't in warn-consumed-analysis.cpp.
> Like I said, they are in warn-consumed-parsing.cpp.

Apologies for the reading comprehension failure.

The SemaCXX/warn-consumed-parsing.cpp does have some of the tests I
was looking for (it's missing ones for constructors and destructors),
and brings up an improvement I'd like to see (at some point):

void function0(void) CONSUMES; // expected-warning {{'consumes'
attribute only applies to methods}}

This is a very confusing warning for the user since the attribute is
applied to a method.  I think warn_attribute_wrong_decl_type and
err_attribute_wrong_decl_type should have a new field for instance
methods (or are static member functions also acceptable?).

> I'm splitting the patch now.

Thanks!

~Aaron
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to