[PATCH] Warning on unused results in an unevaluated context

Aaron Ballman aaron at aaronballman.com
Thu Oct 16 06:05:26 PDT 2014


On Wed, Oct 15, 2014 at 10:33 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> Does this still warn on cases like:
>
>   typeid(f(), g());
>
> where we don't know we've got an evaluated operand until after we've
> finished parsing it?
>
> ... Hmm, we don't seem to get any warning on that case right now. =( Might
> be worth someone looking into that, maybe there are other cases we're
> missing.

Is that something you would like done as part of this patch, or as a
separate one?

~Aaron

>
> On Wed, Oct 15, 2014 at 1:07 PM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
>>
>> We currently emit diagnostics warning about unused results while in an
>> unevaluated context. This seems a bit strange to me, since an
>> unevaluated context implies we aren't using *any* results. This patch
>> addresses that by not emitting such diagnostics from an unevaluated
>> context. It also fixes PR18571.
>>
>> ~Aaron
>
>



More information about the cfe-commits mailing list