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

2017-04-28 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky updated this revision to Diff 97179. nlewycky added a comment. [No changes, just full context this time.] https://reviews.llvm.org/D32412 Files: include/clang/Sema/Sema.h lib/AST/ExprConstant.cpp lib/Sema/SemaChecking.cpp

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

2017-04-28 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky added a comment. > If we're now catching integer overflow in more cases, please add some > relevant testcases. Both more and fewer. More because we no longer have a whitelist of three kinds of expressions that we recurse into. Fewer because we no longer call IgnoreParenCasts() on the

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

2017-04-28 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky updated this revision to Diff 97178. nlewycky edited the summary of this revision. nlewycky added a comment. Rebase. Now that ObjCBoxedExpr change is in, we can remove Sema::CheckForIntOverflow entirely. https://reviews.llvm.org/D32412 Files: include/clang/Sema/Sema.h

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

2017-04-27 Thread Richard Smith via Phabricator via cfe-commits
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,

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

2017-04-23 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky created this revision. Remove clang::Sema::CheckForIntOverflow(E) by calling into E->EvaluateForOverflow instead. CheckForIntOverflow implemented a whitelist of top-level expressions to check, currently BinaryOperator and InitListExpr. Two changes are made to avoid regression with the