HomePhabricator

[ubsan] Detect signed overflow UB in remainder operations

Authored by vsk on Feb 24 2017, 4:43 PM.

Description

[ubsan] Detect signed overflow UB in remainder operations

Teach ubsan to diagnose remainder operations which have undefined
behavior due to signed overflow (e.g INT_MIN % -1).

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

llvm-svn: 296214