Skip to content

Commit 3e2534b

Browse files
committed
Move isSigned/isUnsigned to BuiltInTypes
1 parent b20ea88 commit 3e2534b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp/misra/src/codingstandards/cpp/misra/BuiltInTypeRules.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ class NumericType extends Type {
137137
Type getRealType() { result = realType }
138138
}
139139

140+
predicate isSignedType(NumericType t) { t.getSignedness() = Signed() }
141+
142+
predicate isUnsignedType(NumericType t) { t.getSignedness() = Unsigned() }
143+
140144
/**
141145
* One of the 10 canonical integer types, which are the standard integer types.
142146
*/

cpp/misra/src/rules/RULE-7-0-4/InappropriateBitwiseOrShiftOperands.ql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ import cpp
1616
import codingstandards.cpp.misra
1717
import codingstandards.cpp.misra.BuiltInTypeRules
1818

19-
predicate isSignedType(NumericType t) { t.getSignedness() = Signed() }
20-
21-
predicate isUnsignedType(NumericType t) { t.getSignedness() = Unsigned() }
22-
2319
predicate isConstantExpression(Expr e) {
2420
e instanceof Literal or
2521
e.isConstant()

0 commit comments

Comments
 (0)