File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
c/misra/src/rules/RULE-13-2 Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 62
62
sameFullExpr ( fullExpr , va1 , va2 ) and
63
63
effect ( variableEffect1 , va1 , v1 ) and
64
64
effect ( variableEffect2 , va2 , v2 ) and
65
+ // Exclude the same effect applying to different objects.
66
+ // This occurs when on is a subject of the other.
67
+ // For example, foo.bar = 1; where both foo and bar are objects modified by the assignment.
65
68
variableEffect1 != variableEffect2 and
66
- // If the effect is local we can directly check if it is unsequenced.
67
- // If the effect is not local (happens in a different function) we use the access as a proxy.
69
+ // If the effect is not local (happens in a different function) we use the call with the access as a proxy.
68
70
(
69
71
va1 .getEnclosingStmt ( ) = variableEffect1 .getEnclosingStmt ( ) and
70
72
va2 .getEnclosingStmt ( ) = variableEffect2 .getEnclosingStmt ( ) and
You can’t perform that action at this time.
0 commit comments