- Notifications
You must be signed in to change notification settings - Fork67
Open
Description
Affected rules
RULE-10-4
Description
The text states that the rule applies tousual arithmetic conversions, and the c spec states that fora ? b : c
theusual arithmetic conversions are performed on operandsb
andc
. However,OperationWithUsualArithmeticConversions
fromMisraExpressions.qll
holds forthis instanceof BinaryOperation and ... or this instanceof AssignArithmeticOperation
, it should also hold forthis instanceof ConditionalExpr
andgetLeftOperand()
/getRightOperand()
should return operands 2 & 3.
Example
voidexample_function() {intx;floaty;boolb;b ?x :y;// FALSE NEGATIVE}