On Jul 23, 2008, at 5:24 PM, Chris Lattner wrote: > > On Jul 23, 2008, at 3:19 PM, Ted Kremenek wrote: > >> Author: kremenek >> Date: Wed Jul 23 17:19:56 2008 >> New Revision: 53964 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=53964&view=rev >> Log: >> Don't flag dead stores when the result of a preincrement/ >> predecrement is used in an enclosing expression. > > So you don't warn about "print(++x)" if x is dead after that? Why > not warn "consider changing ++x to 'x+1'"?
My reasoning was to reduce noise. Stylistically many people like to do ++x to compute the value used in the enclosing expression, and I'm a little doubtful that warning about these kinds of dead stores will ever find real errors. Thoughts? _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
