remove redundant inline casts in arguments where the type is inferred by the call target

This commit is contained in:
Erik Krogh Kristensen
2021-10-29 14:37:56 +02:00
parent 15c90adec5
commit d36c66cfca
29 changed files with 51 additions and 60 deletions

View File

@@ -88,7 +88,7 @@ abstract class Architecture extends string {
or
t instanceof LongLongType and result = this.longLongSize()
or
result = this.enumBitSize(t.(Enum))
result = this.enumBitSize(t)
or
result = this.integralBitSize(t.(SpecifiedType).getBaseType())
or
@@ -183,7 +183,7 @@ abstract class Architecture extends string {
or
t instanceof ReferenceType and result = this.pointerSize()
or
result = this.enumAlignment(t.(Enum))
result = this.enumAlignment(t)
or
result = this.alignment(t.(SpecifiedType).getBaseType())
or
@@ -232,14 +232,14 @@ private Field getAnInitialField(PaddedType t) {
result = t.getAField()
or
// Initial field of the type of a field of the union
result = getAnInitialField(t.getAField().getUnspecifiedType().(PaddedType))
result = getAnInitialField(t.getAField().getUnspecifiedType())
else
exists(Field firstField | t.fieldIndex(firstField) = 1 |
// The first field of `t`
result = firstField
or
// Initial field of the first field of `t`
result = getAnInitialField(firstField.getUnspecifiedType().(PaddedType))
result = getAnInitialField(firstField.getUnspecifiedType())
)
}