Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add assertions checking SignExtend{32,64}'s bit width.
Summary: The bit width must be greater than zero, otherwise we shift by the integer's width, which is UB. Also (more obviously) the width must be less than or equal to the integer's width, otherwise we shift by a negative number, which is also UB. Reviewers: rnk Subscribers: llvm-commits, dylanmckay Differential Revision: https://reviews.llvm.org/D22442 llvm-svn: 275720
- Loading branch information
Justin Lebar
committed
Jul 17, 2016
1 parent
cbba3c4
commit ab549c8
Showing
1 changed file
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters