GeneralPurpose-MixedUpArgumentOrderΒΆ
Argument name equals one of the names of the parameters, but not to the one corresponding to the argument
Required inputs: IR
- which has the same name as a parameter of the called routine and
- is used for a different parameter
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
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.