[cfe-commits] r172016 - in /cfe/trunk: include/clang/AST/Expr.h lib/AST/ExprConstant.cpp lib/Sema/SemaStmt.cpp test/Sema/switch-1.c

jahanian fjahanian at apple.com
Fri Jan 18 11:06:21 PST 2013


On Jan 17, 2013, at 3:24 PM, Richard Smith <richard at metafoo.co.uk> wrote:

> This looks like a good start. But I think it won't check for integer
> overflow in subexpressions of a full-expression? eg, "case (123456 *
> 789012) + 1:" In order to catch that without repeatedly evaluating
> subexpressions, I was thinking you could move the checking logic into
> ExprConstant.cpp.
> 

You were correct, it wasn't. So, I moved the checking logic into ExprConstant.cpp, using the evaluator
already available there. Here is my latest patch.

	
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-intoverflow.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130118/5700161b/attachment.txt>
-------------- next part --------------


- Fariborz




More information about the cfe-commits mailing list