NoQ added a comment.

> which would re-evaluate the cast and return the casted object

Rather not. Because i'm changing my mind again about avoiding the redundant 
cast in `&element{T, HeapSymRegion{conj<T *>}}` - this time by not calling 
`evalCast` after a conservatively evaluated operator new call (this would 
ensure that no existing behavior breaks in the conservative case without 
changing how all casts everywhere work), and this wouldn't be compatible with 
this `CallEvent`-based approach because in the `CallEvent` we have no way of 
figuring out if the call was inlined or evaluated conservatively. We could 
still move the cast logic before the `PostCall` callback, and then retrieve the 
casted value from the program state (wherever it is).  But this is an example 
of stuff that becomes harder when we merge the callbacks together, and it took 
me a few hours to stumble upon that, so who knows what other problems would we 
encounter, so i feel that future-proof-ness is worth it.


https://reviews.llvm.org/D41406



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to