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
Please sign in to comment