File tree Expand file tree Collapse file tree
cpp/ql/src/semmle/code/cpp/ir/implementation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -967,13 +967,31 @@ class CompareNEInstruction extends CompareInstruction {
967967 }
968968}
969969
970+ /**
971+ * Represents an instruction that does a relative comparison of two values, such as `<` or `>=`.
972+ */
970973class RelationalInstruction extends CompareInstruction {
971974 RelationalInstruction ( ) {
972975 opcode instanceof RelationalOpcode
973976 }
974-
977+ /**
978+ * Gets the operand on the "greater" (or "greater-or-equal") side
979+ * of this relational instruction, that is, the side that is larger
980+ * if the overall instruction evaluates to `true`; for example on
981+ * `x <= 20` this is the `20`, and on `y > 0` it is `y`.
982+ */
975983 abstract Instruction getGreaterOperand ( ) ;
984+
985+ /**
986+ * Gets the operand on the "lesser" (or "lesser-or-equal") side
987+ * of this relational instruction, that is, the side that is smaller
988+ * if the overall instruction evaluates to `true`; for example on
989+ * `x <= 20` this is `x`, and on `y > 0` it is the `0`.
990+ */
976991 abstract Instruction getLesserOperand ( ) ;
992+ /**
993+ * Holds if this relational instruction is strict (is not an "or-equal" instruction).
994+ */
977995 abstract predicate isStrict ( ) ;
978996}
979997
Original file line number Diff line number Diff line change @@ -967,13 +967,31 @@ class CompareNEInstruction extends CompareInstruction {
967967 }
968968}
969969
970+ /**
971+ * Represents an instruction that does a relative comparison of two values, such as `<` or `>=`.
972+ */
970973class RelationalInstruction extends CompareInstruction {
971974 RelationalInstruction ( ) {
972975 opcode instanceof RelationalOpcode
973976 }
974-
977+ /**
978+ * Gets the operand on the "greater" (or "greater-or-equal") side
979+ * of this relational instruction, that is, the side that is larger
980+ * if the overall instruction evaluates to `true`; for example on
981+ * `x <= 20` this is the `20`, and on `y > 0` it is `y`.
982+ */
975983 abstract Instruction getGreaterOperand ( ) ;
984+
985+ /**
986+ * Gets the operand on the "lesser" (or "lesser-or-equal") side
987+ * of this relational instruction, that is, the side that is smaller
988+ * if the overall instruction evaluates to `true`; for example on
989+ * `x <= 20` this is `x`, and on `y > 0` it is the `0`.
990+ */
976991 abstract Instruction getLesserOperand ( ) ;
992+ /**
993+ * Holds if this relational instruction is strict (is not an "or-equal" instruction).
994+ */
977995 abstract predicate isStrict ( ) ;
978996}
979997
Original file line number Diff line number Diff line change @@ -967,13 +967,31 @@ class CompareNEInstruction extends CompareInstruction {
967967 }
968968}
969969
970+ /**
971+ * Represents an instruction that does a relative comparison of two values, such as `<` or `>=`.
972+ */
970973class RelationalInstruction extends CompareInstruction {
971974 RelationalInstruction ( ) {
972975 opcode instanceof RelationalOpcode
973976 }
974-
977+ /**
978+ * Gets the operand on the "greater" (or "greater-or-equal") side
979+ * of this relational instruction, that is, the side that is larger
980+ * if the overall instruction evaluates to `true`; for example on
981+ * `x <= 20` this is the `20`, and on `y > 0` it is `y`.
982+ */
975983 abstract Instruction getGreaterOperand ( ) ;
984+
985+ /**
986+ * Gets the operand on the "lesser" (or "lesser-or-equal") side
987+ * of this relational instruction, that is, the side that is smaller
988+ * if the overall instruction evaluates to `true`; for example on
989+ * `x <= 20` this is `x`, and on `y > 0` it is the `0`.
990+ */
976991 abstract Instruction getLesserOperand ( ) ;
992+ /**
993+ * Holds if this relational instruction is strict (is not an "or-equal" instruction).
994+ */
977995 abstract predicate isStrict ( ) ;
978996}
979997
You can’t perform that action at this time.
0 commit comments