[PATCH] Warning on unused results in an unevaluated context

Richard Smith richard at metafoo.co.uk
Wed Oct 15 19:33:19 PDT 2014


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.

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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141015/aca2c71b/attachment.html>


More information about the cfe-commits mailing list