Skip to content

Commit 26bac9f

Browse files
ihsinmerdmarsh2
andauthored
Apply suggestions from code review
Co-authored-by: Robert Marsh <[email protected]>
1 parent 10cc574 commit 26bac9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBoolType.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
import cpp
1616
import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
1717

18-
/** Holds, if it is an expression, a boolean increment. */
18+
/** Holds if `exp` increments a boolean value. */
1919
predicate incrementBoolType(Expr exp) {
2020
exp.(IncrementOperation).getOperand().getType() instanceof BoolType
2121
}
2222

23-
/** Holds, if this is an expression, applies a minus to a boolean type. */
23+
/** Holds if `exp` applies the unary minus operator to a boolean type. */
2424
predicate revertSignBoolType(Expr exp) {
2525
exp.(AssignExpr).getRValue().(UnaryMinusExpr).getAnOperand().getType() instanceof BoolType and
2626
exp.(AssignExpr).getLValue().getType() instanceof BoolType

0 commit comments

Comments
 (0)