]> granicus.if.org Git - clang/commit
Left shifts of negative values are defined if -fwrapv is set
authorJames Molloy <james.molloy@arm.com>
Tue, 16 Aug 2016 09:45:36 +0000 (09:45 +0000)
committerJames Molloy <james.molloy@arm.com>
Tue, 16 Aug 2016 09:45:36 +0000 (09:45 +0000)
commitd0eb6c1d8c6a7b7b77c8d4fb7c15ba9f3e9cdb51
treecee7785e4c04787bec5fca726fe45f7e460fbcc7
parentca29d71962e2a8c82877ae295bfa0374b8ec9952
Left shifts of negative values are defined if -fwrapv is set

This means we shouldn't emit ubsan detection code or warn.
Fixes PR25552.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278786 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprScalar.cpp
lib/Sema/SemaExpr.cpp
test/CodeGen/wrapv-lshr-sanitize.c [new file with mode: 0644]
test/Sema/negative-shift-wrapv.c [new file with mode: 0644]