AutosarC++18_03-A8.4.4

Multiple output values from a function should be returned as a struct or tuple

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

output_parameter

Use return value instead of output parameter.

None

False

Options

allow_in_out_parameters

allow_in_out_parameters : bool = False

Whether parameters used as in-out parameters rather than purely output parameters should be allowed.
 

allow_modifying_calls

allow_modifying_calls : bool = True

Whether a function may call a function on a parameter that modifies it, without regarding it as a violation here.
 

allow_move_parameters

allow_move_parameters : bool = True

Whether a move parameter (a rvalue reference) may be written to without triggering a violation.

Note: move-constructors and move-assignments are allowed in either case.

 

allow_this_modification

allow_this_modification : bool = True

Whether a function may call a member-function on a parameter that modifies this, that is the internal parameter state (allow_modifying_calls must be false if this is set to false).
 

exclude_constructors

exclude_constructors : bool = True

Whether not to report parameters on constructors.
 

exclude_operators

exclude_operators : bool = False

Whether not to report parameters on operator functions.

Note: if set to true, this also sets exclude_shift_operators to true.

 

exclude_shift_operators

exclude_shift_operators : bool = False

Whether not to report parameters on shift operator functions (operator<<(), operator<<=(), operator>>(), and operator>>=()).
 

only_report_multiple_output_parameters

only_report_multiple_output_parameters : bool = True

Whether to only report output-parameters, if a function has more than one or also returns a value.
 

record_field_modification_threshold

record_field_modification_threshold : int = 0

A percentage of how many record fields may be modified, before the record pointer is considered an output parameter:

0 : every field modification counts as an output parameter
100: the record pointer is only regarded an output parameter if all field are modified