On Mon, Mar 23, 2015 at 11:47 AM, Michael Kuperstein <[email protected]> wrote: > Also, there's something a bit odd about the warning text for an assume with > side-effects. > > "the argument to '__assume' has side effects that will be discarded" suggests > that only the side effects will be discarded.
Which is correct. The side effects are unevaluated, but __assume is not. Think: sizeof(i++). i will not be incremented, but sizeof is still evaluated and produces a result. > This: > (a) doesn't make a lot of sense to me, and > (b) doesn't imply that nothing at all will be emitted. > That is, for "assume(a > 0 && i++)", the warning would make me expect that > what I ended up with was equivalent to "assume(a > 0)" or perhaps "assume(a > > 0 && i)". The latter is correct, not the former. > > Is this just a problem with how I'm reading the warning? If not, any > suggestions for alternative text? I'm not certain where the confusion lies, but if there is alternative text that would be more clear, then great! ~Aaron > > > http://reviews.llvm.org/D8548 > > EMAIL PREFERENCES > http://reviews.llvm.org/settings/panel/emailpreferences/ > > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
