[cfe-commits] [patch] PR13413: Let GNUNullExpr::HasSideEffects() return false

Richard Smith richard at metafoo.co.uk
Thu Jul 19 20:00:43 PDT 2012


LGTM. While you're there, can you also fix CXXNullPtrLiteralExpr,
CXXBoolLiteralExpr, and CXXThisExpr? I think those are the most important
ones we're getting wrong, for the purpose of this warning. (If you have the
energy, a whole big pile of other expressions are mishandled here,
including most of the C++-specific nodes. We should convert this code to a
switch so that people know to update it when adding a new Expr node...)

On Thu, Jul 19, 2012 at 7:07 PM, Nico Weber <thakis at chromium.org> wrote:

> On Thu, Jul 19, 2012 at 7:06 PM, Nico Weber <thakis at chromium.org> wrote:
> > Hi,
> >
> > the attached patch lets GNUNullExpr::HasSideEffects() return false.
> > This fixes PR13413, -Wunused-private-field not warning on used private
> > fields that are initialized to NULL.
> >
> > Nico
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120719/a7bfb1ea/attachment.html>


More information about the cfe-commits mailing list