diff --git a/c/misra/src/rules/RULE-10-1/OperandsOfAnInappropriateEssentialType.ql b/c/misra/src/rules/RULE-10-1/OperandsOfAnInappropriateEssentialType.ql index 6fdde80119..005b7c6cf5 100644 --- a/c/misra/src/rules/RULE-10-1/OperandsOfAnInappropriateEssentialType.ql +++ b/c/misra/src/rules/RULE-10-1/OperandsOfAnInappropriateEssentialType.ql @@ -14,7 +14,6 @@ import cpp import codingstandards.c.misra import codingstandards.c.misra.EssentialTypes -import codingstandards.cpp.Bitwise /** * Holds if the operator `operator` has an operand `child` that is of an inappropriate essential type @@ -178,7 +177,7 @@ predicate isInappropriateEssentialType( child = [ operator.(BinaryBitwiseOperation).getAnOperand(), - operator.(Bitwise::AssignBitwiseOperation).getAnOperand() + operator.(AssignBitwiseOperation).getAnOperand() ] and not operator instanceof LShiftExpr and not operator instanceof RShiftExpr and diff --git a/cpp/autosar/src/rules/M5-0-20/BitwiseOperatorOperandsHaveDifferentUnderlyingType.ql b/cpp/autosar/src/rules/M5-0-20/BitwiseOperatorOperandsHaveDifferentUnderlyingType.ql index 9e85a15e50..6d0554bf11 100644 --- a/cpp/autosar/src/rules/M5-0-20/BitwiseOperatorOperandsHaveDifferentUnderlyingType.ql +++ b/cpp/autosar/src/rules/M5-0-20/BitwiseOperatorOperandsHaveDifferentUnderlyingType.ql @@ -16,7 +16,6 @@ import cpp import codingstandards.cpp.autosar -import codingstandards.cpp.Bitwise import codingstandards.cpp.Conversion predicate isBinaryBitwiseOperation(Operation o, VariableAccess l, VariableAccess r) { @@ -24,7 +23,7 @@ predicate isBinaryBitwiseOperation(Operation o, VariableAccess l, VariableAccess l = bbo.getLeftOperand() and r = bbo.getRightOperand() ) or - exists(Bitwise::AssignBitwiseOperation abo | abo = o | + exists(AssignBitwiseOperation abo | abo = o | l = abo.getLValue() and r = abo.getRValue() ) diff --git a/cpp/autosar/src/rules/M5-0-21/BitwiseOperatorAppliedToSignedTypes.ql b/cpp/autosar/src/rules/M5-0-21/BitwiseOperatorAppliedToSignedTypes.ql index d000155189..02bb5314cd 100644 --- a/cpp/autosar/src/rules/M5-0-21/BitwiseOperatorAppliedToSignedTypes.ql +++ b/cpp/autosar/src/rules/M5-0-21/BitwiseOperatorAppliedToSignedTypes.ql @@ -17,7 +17,6 @@ import cpp import codingstandards.cpp.autosar -import codingstandards.cpp.Bitwise from Operation o, VariableAccess va where @@ -25,7 +24,7 @@ where ( o instanceof UnaryBitwiseOperation or o instanceof BinaryBitwiseOperation or - o instanceof Bitwise::AssignBitwiseOperation + o instanceof AssignBitwiseOperation ) and o.getAnOperand() = va and va.getTarget().getUnderlyingType().(IntegralType).isSigned() diff --git a/cpp/autosar/src/rules/M5-8-1/RightBitShiftOperandIsNegativeOrTooWide.ql b/cpp/autosar/src/rules/M5-8-1/RightBitShiftOperandIsNegativeOrTooWide.ql index 38da7115f3..b94d76fd94 100644 --- a/cpp/autosar/src/rules/M5-8-1/RightBitShiftOperandIsNegativeOrTooWide.ql +++ b/cpp/autosar/src/rules/M5-8-1/RightBitShiftOperandIsNegativeOrTooWide.ql @@ -17,7 +17,6 @@ import cpp import codingstandards.cpp.autosar -import codingstandards.cpp.Bitwise class ShiftOperation extends Operation { Expr leftOperand; @@ -34,7 +33,7 @@ class ShiftOperation extends Operation { rightOperand = o.getRightOperand() ) or - exists(Bitwise::AssignBitwiseOperation o | this = o | + exists(AssignBitwiseOperation o | this = o | ( o instanceof AssignLShiftExpr or diff --git a/cpp/common/src/codingstandards/cpp/Bitwise.qll b/cpp/common/src/codingstandards/cpp/Bitwise.qll deleted file mode 100644 index 871587b4ea..0000000000 --- a/cpp/common/src/codingstandards/cpp/Bitwise.qll +++ /dev/null @@ -1,10 +0,0 @@ -/** - * A library for addressing issues in bitwise operator modelling in our database schema. - */ - -private import cpp as cpp - -module Bitwise { - /** A binary bitwise assign operation. */ - class AssignBitwiseOperation extends cpp::AssignBitwiseOperation { } -}