C++: Remove getLocationImpl predicate that is always overridden

Also remove the predicate referred to in ints implementation, as it is no
longer used.
This commit is contained in:
Jeroen Ketema
2023-03-09 10:27:15 +01:00
parent 791f5913d2
commit 4ee13a3234
2 changed files with 0 additions and 14 deletions

View File

@@ -56,19 +56,11 @@ class Node0Impl extends TIRDataFlowNode0 {
/** Gets the operands corresponding to this node, if any. */ /** Gets the operands corresponding to this node, if any. */
Operand asOperand() { result = this.(OperandNode0).getOperand() } Operand asOperand() { result = this.(OperandNode0).getOperand() }
/** INTERNAL: Do not use. */
Location getLocationImpl() {
none() // overridden by subclasses
}
/** INTERNAL: Do not use. */ /** INTERNAL: Do not use. */
string toStringImpl() { string toStringImpl() {
none() // overridden by subclasses none() // overridden by subclasses
} }
/** Gets the location of this node. */
final Location getLocation() { result = this.getLocationImpl() }
/** Gets a textual representation of this node. */ /** Gets a textual representation of this node. */
final string toString() { result = this.toStringImpl() } final string toString() { result = this.toStringImpl() }
@@ -113,8 +105,6 @@ abstract class InstructionNode0 extends Node0Impl {
override DataFlowType getType() { result = getInstructionType(instr, _) } override DataFlowType getType() { result = getInstructionType(instr, _) }
final override Location getLocationImpl() { result = instr.getLocation() }
override string toStringImpl() { override string toStringImpl() {
// This predicate is overridden in subclasses. This default implementation // This predicate is overridden in subclasses. This default implementation
// does not use `Instruction.toString` because that's expensive to compute. // does not use `Instruction.toString` because that's expensive to compute.
@@ -158,8 +148,6 @@ abstract class OperandNode0 extends Node0Impl {
override DataFlowType getType() { result = getOperandType(op, _) } override DataFlowType getType() { result = getOperandType(op, _) }
final override Location getLocationImpl() { result = op.getLocation() }
override string toStringImpl() { result = op.toString() } override string toStringImpl() { result = op.toString() }
final override predicate isGLValue() { exists(getOperandType(op, true)) } final override predicate isGLValue() { exists(getOperandType(op, true)) }

View File

@@ -390,8 +390,6 @@ private class Node0 extends Node, TNode0 {
override DataFlowType getType() { result = node.getType() } override DataFlowType getType() { result = node.getType() }
override Location getLocationImpl() { result = node.getLocationImpl() }
override string toStringImpl() { override string toStringImpl() {
// This predicate is overridden in subclasses. This default implementation // This predicate is overridden in subclasses. This default implementation
// does not use `Instruction.toString` because that's expensive to compute. // does not use `Instruction.toString` because that's expensive to compute.