C++: Handle builtin FormattingFunctions better

This commit is contained in:
Calum Grant
2024-10-23 14:35:32 +01:00
parent c5a082fd8e
commit f37be68067

View File

@@ -49,9 +49,12 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction {
if this.hasDefinition()
then firstFormatArgumentIndex = this.getDefinition().getNumberOfParameters()
else
forex(FunctionDeclarationEntry fde | fde = this.getAnExplicitDeclarationEntry() |
firstFormatArgumentIndex = fde.getNumberOfParameters()
)
if this instanceof BuiltInFunction
then firstFormatArgumentIndex = this.getNumberOfParameters()
else
forex(FunctionDeclarationEntry fde | fde = this.getAnExplicitDeclarationEntry() |
firstFormatArgumentIndex = fde.getNumberOfParameters()
)
}
/** Gets the position at which the format parameter occurs. */