[PATCH] Have HasSideEffects() return false for __attribute__((const)) functions

Michael Kuperstein michael.m.kuperstein at intel.com
Mon Mar 23 08:47:05 PDT 2015


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. 
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)".

Is this just a problem with how I'm reading the warning? If not, any suggestions for alternative text?


http://reviews.llvm.org/D8548

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list