[ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

Description

[ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

C requires the operands of arithmetic expressions to be promoted if
their types are smaller than an int. Ubsan emits overflow checks when
this sort of type promotion occurs, even if there is no way to actually
get an overflow with the promoted type.

This patch teaches clang how to omit the superflous overflow checks
(addressing PR20193).

Testing: check-clang and check-ubsan.

Differential Revision: https://reviews.llvm.org/D29369

Details

Committed
vedantkFeb 24 2017, 4:43 PM
Differential Revision
D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)
Parents
rL296212: Remove svn:eol-style=native from Properties.
Branches
Unknown
Tags
Unknown