@@ -29,9 +29,9 @@ predicate isLogicalOrandBitwise(Expr exptmp) {
2929 (
3030 exptmp .( LogicalOrExpr ) .getRightOperand ( ) .( BinaryBitwiseOperation ) .getLeftOperand ( ) .getType ( )
3131 instanceof BoolType and
32- // The essence of these lines is to improve the quality of detection by eliminating the situation
33- // of processing a logical type by bit operations. In fact, the predicate looks for a situation
34- // when the left operand of a bit operation has a boolean type, which already suggests that the priority is not correct.
32+ // The essence of these lines is to improve the quality of detection by eliminating the situation
33+ // of processing a logical type by bit operations. In fact, the predicate looks for a situation
34+ // when the left operand of a bit operation has a boolean type, which already suggests that the priority is not correct.
3535 // But if the right-hand operand is 0 or 1, then there is a possibility that the author intended so.
3636 not exptmp
3737 .( LogicalOrExpr )
@@ -54,7 +54,7 @@ predicate isLogicalOrandBitwise(Expr exptmp) {
5454 instanceof BoolType and
5555 // Looking for a situation in which the right-hand operand of a bit operation is not limited to 0 or 1.
5656 // In this case, the logical operation will be performed with the result of a binary operation that is not a Boolean type.
57- // In my opinion this indicates a priority error. after all, it will be quite difficult for a developer
57+ // In my opinion this indicates a priority error. after all, it will be quite difficult for a developer
5858 // to evaluate the conversion of the results of a bit operation to a boolean type.
5959 not exptmp
6060 .( LogicalAndExpr )
@@ -173,17 +173,17 @@ where
173173 isLogicalOrandBitwise ( exp ) and
174174 msg = "Binary operations have higher priority."
175175 or
176- // Looking for a situation where the equality of the sizes of the first operands
176+ // Looking for a situation where the equality of the sizes of the first operands
177177 // might indicate that the developer planned to perform an operation between them.
178- // However, the absence of parentheses means that the rightmost operation will be performed initially.
178+ // However, the absence of parentheses means that the rightmost operation will be performed initially.
179179 isBitwiseandBitwise ( exp ) and
180180 isDifferentSize ( exp .( BinaryBitwiseOperation ) .getLeftOperand ( ) ,
181181 exp .( BinaryBitwiseOperation ) .getRightOperand ( ) .( BinaryBitwiseOperation ) .getLeftOperand ( ) ,
182182 exp .( BinaryBitwiseOperation ) .getRightOperand ( ) .( BinaryBitwiseOperation ) .getRightOperand ( ) ) and
183183 msg = "Expression ranges do not match operation precedence."
184184 or
185- // Looking for a out those expressions that, as a result of identifying the priority with parentheses,
186- // will give different values. As a consequence, this piece of code was supposed to find errors associated
185+ // Looking for a out those expressions that, as a result of identifying the priority with parentheses,
186+ // will give different values. As a consequence, this piece of code was supposed to find errors associated
187187 // with possible outcomes of operations.
188188 isBitwiseandBitwise ( exp ) and
189189 isDifferentResults ( exp .( BinaryBitwiseOperation ) .getLeftOperand ( ) ,
0 commit comments