summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-04-29 10:36:58 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-04-29 10:36:58 +0000
commitbfaa63a82eb84ed59573a8cb77ccd3e0d2b01bb0 (patch)
tree5502e024333cdb892e49d274c6fa6eef7e55dbe6 /clang/lib/Sema/Sema.cpp
parent4f3c985edd224303a607af0facec35829ab1e5a2 (diff)
downloadbcm5719-llvm-bfaa63a82eb84ed59573a8cb77ccd3e0d2b01bb0.tar.gz
bcm5719-llvm-bfaa63a82eb84ed59573a8cb77ccd3e0d2b01bb0.zip
[FIX] Prevent division/modulo by zero in parameters
When we materialize parameter SCEVs we did so without considering the side effects they might have, e.g., both division and modulo are undefined if the right hand side is zero. This is a problem because we potentially extended the domain under which we evaluate parameters, thus we might have introduced such undefined behaviour. To prevent that from happening we will now guard divisions and modulo operations in the parameters with a compare and select. llvm-svn: 268023
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud