[PATCH] D31839: make -Winteger-overflow find overflows in function arguments

Nick Lewycky via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 10 11:06:54 PDT 2017


nlewycky created this revision.

When checkingForOverflow(), look through call arguments (and the callee itself if calculated).

Make the statement visitor go through ObjCBoxedExpr by default because it has a single subexpr node. Don't do that when looking for a pointer object, stop because the boxed expr is the pointer.


https://reviews.llvm.org/D31839

Files:
  include/clang/Sema/Sema.h
  lib/AST/ExprConstant.cpp
  lib/Sema/SemaChecking.cpp
  lib/Sema/SemaExprObjC.cpp
  test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp
  test/OpenMP/distribute_simd_aligned_messages.cpp
  test/OpenMP/for_simd_aligned_messages.cpp
  test/OpenMP/parallel_for_simd_aligned_messages.cpp
  test/OpenMP/simd_aligned_messages.cpp
  test/OpenMP/target_parallel_for_simd_aligned_messages.cpp
  test/OpenMP/target_simd_aligned_messages.cpp
  test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp
  test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp
  test/OpenMP/taskloop_simd_aligned_messages.cpp
  test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp
  test/OpenMP/teams_distribute_simd_aligned_messages.cpp
  test/SemaCXX/integer-overflow.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31839.94582.patch
Type: text/x-patch
Size: 15692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170410/2e4ee615/attachment-0001.bin>


More information about the cfe-commits mailing list