GeneralPurpose-MixedUpArgumentOrderΒΆ

Argument name equals one of the names of the parameters, but not to the one corresponding to the argument

Required inputs: IR

A call argument
  • which has the same name as a parameter of the called routine and
  • is used for a different parameter
might indicate an erroneous order of arguments in the call.

For example, given a function declaration

    void send(int port, int message)
, a call
    send(the_message, port)
could point to a bug.

This extends to member names, e.g., given a struct

    struct S {int port; int message;};
, the following code
    struct S s;
    send(s.message, s.port);
also could point to a bug.

Possible Messages

Key

Text

Severity

Disabled

possible_argument_order_mixed_up

Name of call argument {} at position {} equals name of parameter at position {}.

None

False

Options