Skip to content

Commit

Permalink
C++: Handle builtin FormattingFunctions better
Browse files Browse the repository at this point in the history
  • Loading branch information
calumgrant committed Oct 23, 2024
1 parent c5a082f commit f37be68
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit f37be68

Please sign in to comment.