[PATCH] D32412: analyze all kinds of expressions for integer overflow

Richard Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 26 23:56:54 PDT 2017


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





More information about the cfe-commits mailing list