Skip to content

Commit 446ff6a

Browse files
committed
Limit operands to integer types
1 parent 2a611a1 commit 446ff6a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp/common/src/codingstandards/cpp/Overflow.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import semmle.code.cpp.valuenumbering.GlobalValueNumbering
1414
*/
1515
class InterestingOverflowingOperation extends Operation {
1616
InterestingOverflowingOperation() {
17+
forex(Expr operand | operand = this.getAnOperand() | operand.getUnderlyingType() instanceof IntegralType) and
1718
// Might overflow or underflow
1819
(
1920
exprMightOverflowNegatively(this)

0 commit comments

Comments
 (0)