mirror of
https://github.com/github/codeql.git
synced 2025-12-23 12:16:33 +01:00
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:
@@ -56,19 +56,11 @@ class Node0Impl extends TIRDataFlowNode0 {
|
||||
/** Gets the operands corresponding to this node, if any. */
|
||||
Operand asOperand() { result = this.(OperandNode0).getOperand() }
|
||||
|
||||
/** INTERNAL: Do not use. */
|
||||
Location getLocationImpl() {
|
||||
none() // overridden by subclasses
|
||||
}
|
||||
|
||||
/** INTERNAL: Do not use. */
|
||||
string toStringImpl() {
|
||||
none() // overridden by subclasses
|
||||
}
|
||||
|
||||
/** Gets the location of this node. */
|
||||
final Location getLocation() { result = this.getLocationImpl() }
|
||||
|
||||
/** Gets a textual representation of this node. */
|
||||
final string toString() { result = this.toStringImpl() }
|
||||
|
||||
@@ -113,8 +105,6 @@ abstract class InstructionNode0 extends Node0Impl {
|
||||
|
||||
override DataFlowType getType() { result = getInstructionType(instr, _) }
|
||||
|
||||
final override Location getLocationImpl() { result = instr.getLocation() }
|
||||
|
||||
override string toStringImpl() {
|
||||
// This predicate is overridden in subclasses. This default implementation
|
||||
// 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, _) }
|
||||
|
||||
final override Location getLocationImpl() { result = op.getLocation() }
|
||||
|
||||
override string toStringImpl() { result = op.toString() }
|
||||
|
||||
final override predicate isGLValue() { exists(getOperandType(op, true)) }
|
||||
|
||||
@@ -390,8 +390,6 @@ private class Node0 extends Node, TNode0 {
|
||||
|
||||
override DataFlowType getType() { result = node.getType() }
|
||||
|
||||
override Location getLocationImpl() { result = node.getLocationImpl() }
|
||||
|
||||
override string toStringImpl() {
|
||||
// This predicate is overridden in subclasses. This default implementation
|
||||
// does not use `Instruction.toString` because that's expensive to compute.
|
||||
|
||||
Reference in New Issue
Block a user