rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

If we're now catching integer overflow in more cases, please add some relevant 
testcases. If this is a pure refactoring that enables those additional 
diagnostics to be produced in future, then this is fine as-is. (For the benefit 
of other people looking at this, the test changes here are caused by a 
pre-existing bug: the notes for why a reference is not usable in a constant 
expression are only produced if we happen to produce diagnostics the first time 
we try to evaluate them.)

I have an unsubstantiated performance concern: we've seen this overflow 
checking having a visible effect on compile times in LNT before, but I'm happy 
to let you figure out whether there's anything else you can do to measure this 
before bouncing it off the LNT bots. (And any cases we're checking with this 
patch but not without it seem to be arbitrary oversights rather than something 
principled.)


https://reviews.llvm.org/D32412



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

Reply via email to