Fix bug in CPP range analysis.

This commit is contained in:
Cornelius Riemenschneider
2020-02-03 14:16:48 +01:00
parent 99d8b48da0
commit 1b68f86d5b

View File

@@ -259,7 +259,7 @@ private predicate safeCast(IntegralType fromtyp, IntegralType totyp) {
private class SafeCastInstruction extends ConvertInstruction {
SafeCastInstruction() {
safeCast(getResultType(), getUnary().getResultType())
safeCast(getUnary().getResultType(), getResultType())
or
getResultType() instanceof PointerType and
getUnary().getResultType() instanceof PointerType