@@ -244,14 +244,14 @@ class CondReason extends Reason, TCondReason {
244244/**
245245 * Holds if `typ` is a small integral type with the given lower and upper bounds.
246246 */
247- private predicate typeBound ( IntegralType typ , int lowerbound , int upperbound ) {
248- typ .isSigned ( ) and typ .getSize ( ) = 1 and lowerbound = - 128 and upperbound = 127
247+ private predicate typeBound ( IRIntegerType typ , int lowerbound , int upperbound ) {
248+ typ .isSigned ( ) and typ .getByteSize ( ) = 1 and lowerbound = - 128 and upperbound = 127
249249 or
250- typ .isUnsigned ( ) and typ .getSize ( ) = 1 and lowerbound = 0 and upperbound = 255
250+ typ .isUnsigned ( ) and typ .getByteSize ( ) = 1 and lowerbound = 0 and upperbound = 255
251251 or
252- typ .isSigned ( ) and typ .getSize ( ) = 2 and lowerbound = - 32768 and upperbound = 32767
252+ typ .isSigned ( ) and typ .getByteSize ( ) = 2 and lowerbound = - 32768 and upperbound = 32767
253253 or
254- typ .isUnsigned ( ) and typ .getSize ( ) = 2 and lowerbound = 0 and upperbound = 65535
254+ typ .isUnsigned ( ) and typ .getByteSize ( ) = 2 and lowerbound = 0 and upperbound = 65535
255255}
256256
257257/**
@@ -260,14 +260,14 @@ private predicate typeBound(IntegralType typ, int lowerbound, int upperbound) {
260260private class NarrowingCastInstruction extends ConvertInstruction {
261261 NarrowingCastInstruction ( ) {
262262 not this instanceof SafeCastInstruction and
263- typeBound ( getResultType ( ) , _, _)
263+ typeBound ( getResultIRType ( ) , _, _)
264264 }
265265
266266 /** Gets the lower bound of the resulting type. */
267- int getLowerBound ( ) { typeBound ( getResultType ( ) , result , _) }
267+ int getLowerBound ( ) { typeBound ( getResultIRType ( ) , result , _) }
268268
269269 /** Gets the upper bound of the resulting type. */
270- int getUpperBound ( ) { typeBound ( getResultType ( ) , _, result ) }
270+ int getUpperBound ( ) { typeBound ( getResultIRType ( ) , _, result ) }
271271}
272272
273273/**
0 commit comments