[PATCH] PR14253: 'warn_unused' attribute for unused warning for non-POD types

David Blaikie dblaikie at gmail.com
Tue Jul 16 10:45:10 PDT 2013


I know we'd previously discussed the idea of being able to warn about
unused variables of non-trivial types - you'd gone so far as to
suggest the idea of a positive attribute (annotate the classes that
have side effects, rather than those that don't, since the former
seems like the exception rather than the rule).

I don't suppose that is sufficiently related to this to warrant any
changes here (we probably want to support this the way GCC does for
compatibility at least, even if we come up with a more advanced scheme
(positive annotations & describing the difference between a full-side
effect (such as printing call start/end) and scope (like locks -
warning when there's no code between construction and destruction))).

On Tue, Jul 16, 2013 at 5:20 AM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
> LGTM.
>
> On 16 July 2013 02:55, Lubos Lunak <l.lunak at suse.cz> wrote:
>>
>>  Hello,
>>
>>  could somebody please review the attached patch for PR14253?
>>
>>  The equivalent GCC patch has been accepted (GCC bug #55203) and libstdc++
>> should use the attribute whenever I or somebody write the patch for it.
>> Presumably this Clang patch should be followed by a patch for libc++ (I do
>> not intend to do that).
>>
>> --
>>  Lubos Lunak
>>  l.lunak at suse.cz
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list