Skip to content

Commit bdcc5e7

Browse files
committed
Dataflow: Refactor getLocation
1 parent bc0ae4c commit bdcc5e7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,12 +2541,13 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
25412541

25422542
abstract string toString();
25432543

2544-
abstract Location getLocation();
2545-
25462544
predicate isSource() { none() }
25472545

25482546
predicate isSink() { none() }
25492547

2548+
/** Gets the location of this node. */
2549+
Location getLocation() { result = this.getNodeEx().getLocation() }
2550+
25502551
predicate isArbitrarySource() { this instanceof TStagePathNodeSrcGrp }
25512552

25522553
predicate isArbitrarySink() { this instanceof TStagePathNodeSinkGrp }
@@ -2589,8 +2590,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
25892590
node.toString() + " " + cc.toString() + " " + t.toString() + " " + ap.toString()
25902591
}
25912592

2592-
override Location getLocation() { result = node.getLocation() }
2593-
25942593
override predicate isSource() {
25952594
sourceNode(node, state) and
25962595
(if hasSourceCallCtx() then cc = ccSomeCall() else cc = ccNone()) and

0 commit comments

Comments
 (0)