AutosarC++18_03-A5.0.2

The condition of an if-statement and the condition of an iteration statement shall have type bool

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

nonbool_if_condition

Condition must have type bool

None

False

nonbool_logical_operator_operand

Sub-condition must have type bool

None

False

nonbool_loop_condition

Condition must have type bool

None

False

Options

only_in_conditions

only_in_conditions : bool = True

If True, only logical operators inside conditions are checked.
 

only_pointer_types

only_pointer_types : bool = False

If true, only report if expressions of pointer type are used.
 

report_do_while_false

report_do_while_false : bool = True

Whether do ... while(0) should be reported.
 

report_while_true

report_while_true : bool = True

Whether while(1) ... should be reported.