AutosarC++18_10-A8.4.7

“in” parameters for “cheap to copy” types shall be passed by value

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

input_parameter

Pass input parameters by value

None

False

Options

allow_basic_types

allow_basic_types : set[bauhaus.ir.LIR_Class_Name] = {'C_Char_Type', 'Void_Type'}

A list of LIR class names that are allowed as non by-value parameters.
 

exclude_operator_functions

exclude_operator_functions : bool = False

If set to true, in parameters with "cheap to copy" types that are not passed by value are not reported for operator functions, as one might not have an option to change the signature.
 

size_threshold

size_threshold : int = 2

Size of a type to be considered cheap to copy in number of words.
 

word_size

word_size : int | None = None

Size of a machine word in number of bytes. If None, uses the size of a pointer.