diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-14 20:27:05 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-14 20:27:05 +0000 |
commit | c694e693b098ca624a65815f2481be3223385107 (patch) | |
tree | 947777f2e40b65772adbd9b49bc7096b21296f93 /clang/lib/Sema/SemaChecking.cpp | |
parent | b8e9b8b703b27c8c4e6fe986b80e80e934269c75 (diff) | |
download | bcm5719-llvm-c694e693b098ca624a65815f2481be3223385107.tar.gz bcm5719-llvm-c694e693b098ca624a65815f2481be3223385107.zip |
Patch to warn on interger overflow in presence of
implicit casts. Reviewed by Reid Kleckner.
rdar://18405357
llvm-svn: 219712
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 58c626351f9..a98b87544a6 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -6754,8 +6754,8 @@ void Sema::CheckImplicitConversions(Expr *E, SourceLocation CC) { /// Diagnose when expression is an integer constant expression and its evaluation /// results in integer overflow void Sema::CheckForIntOverflow (Expr *E) { - if (isa<BinaryOperator>(E->IgnoreParens())) - E->EvaluateForOverflow(Context); + if (isa<BinaryOperator>(E->IgnoreParenCasts())) + E->IgnoreParenCasts()->EvaluateForOverflow(Context); } namespace { |