mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Dataflow: Refactor getLocation
This commit is contained in:
@@ -2541,12 +2541,13 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
|
||||
|
||||
abstract string toString();
|
||||
|
||||
abstract Location getLocation();
|
||||
|
||||
predicate isSource() { none() }
|
||||
|
||||
predicate isSink() { none() }
|
||||
|
||||
/** Gets the location of this node. */
|
||||
Location getLocation() { result = this.getNodeEx().getLocation() }
|
||||
|
||||
predicate isArbitrarySource() { this instanceof TStagePathNodeSrcGrp }
|
||||
|
||||
predicate isArbitrarySink() { this instanceof TStagePathNodeSinkGrp }
|
||||
@@ -2589,8 +2590,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
|
||||
node.toString() + " " + cc.toString() + " " + t.toString() + " " + ap.toString()
|
||||
}
|
||||
|
||||
override Location getLocation() { result = node.getLocation() }
|
||||
|
||||
override predicate isSource() {
|
||||
sourceNode(node, state) and
|
||||
(if hasSourceCallCtx() then cc = ccSomeCall() else cc = ccNone()) and
|
||||
|
||||
Reference in New Issue
Block a user