@@ -91,21 +91,22 @@ private predicate isTypeInComplexDomain(FloatingPointType type) {
9191 type .getUnderlyingType ( ) .( FloatingPointType ) .getDomain ( ) instanceof ComplexDomain
9292}
9393
94- predicate mistypedFunctionArguments ( FunctionCall fc , Function f , Parameter p ) {
95- f = fc .getTarget ( ) and
96- p = f .getAParameter ( ) and
97- hasZeroParamDecl ( f ) and
98- isCompiledAsC ( f .getFile ( ) ) and
99- not f .isVarargs ( ) and
100- not f instanceof BuiltInFunction and
101- p .getIndex ( ) < fc .getNumberOfArguments ( ) and
102- // Parameter p and its corresponding call argument must have mismatched types
103- not argMayBeUsed ( fc .getArgument ( p .getIndex ( ) ) , p )
94+ predicate mistypedFunctionArguments ( FunctionCall fc , Parameter p ) {
95+ exists ( Function f |
96+ f = fc .getTarget ( ) and
97+ p = f .getAParameter ( ) and
98+ hasZeroParamDecl ( f ) and
99+ isCompiledAsC ( f .getFile ( ) ) and
100+ not f .isVarargs ( ) and
101+ not f instanceof BuiltInFunction and
102+ p .getIndex ( ) < fc .getNumberOfArguments ( ) and
103+ // Parameter p and its corresponding call argument must have mismatched types
104+ not argMayBeUsed ( fc .getArgument ( p .getIndex ( ) ) , p )
105+ )
104106}
105107
106- predicate complexArgumentPassedToRealParameter ( FunctionCall fc , Function f , Parameter p ) {
107- f = fc .getTarget ( ) and
108- p = f .getAParameter ( ) and
108+ predicate complexArgumentPassedToRealParameter ( FunctionCall fc , Parameter p ) {
109+ p = fc .getTarget ( ) .getAParameter ( ) and
109110 // Some implementations implicitly convert complex floating point values by
110111 // extracting the real part of the complex number (in-place or via a creal() call).
111112 // This predicate holds in those cases unless the value is explicitly converted.
0 commit comments