[PATCH] Fixes and features for Consumed analysis
Aaron Ballman
aaron at aaronballman.com
Wed Aug 21 11:54:45 PDT 2013
On Wed, Aug 21, 2013 at 2:39 PM, Christian Wailes
<chriswailes at google.com> 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
More information about the cfe-commits
mailing list