Skip to content

Commit cbb58d0

Browse files
committed
Dataflow: Add a getLocation rootdef.
1 parent 65189e0 commit cbb58d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,11 +1580,15 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
15801580
*/
15811581
private class SummaryCtx extends TSummaryCtx {
15821582
abstract string toString();
1583+
1584+
abstract Location getLocation();
15831585
}
15841586

15851587
/** A summary context from which no flow summary can be generated. */
15861588
private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone {
15871589
override string toString() { result = "<none>" }
1590+
1591+
override Location getLocation() { result.hasLocationInfo("", 0, 0, 0, 0) }
15881592
}
15891593

15901594
/** A summary context from which a flow summary can be generated. */
@@ -1601,7 +1605,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
16011605

16021606
override string toString() { result = p + concat(" : " + this.ppTyp()) + " " + ap }
16031607

1604-
Location getLocation() { result = p.getLocation() }
1608+
override Location getLocation() { result = p.getLocation() }
16051609
}
16061610

16071611
private predicate fwdFlowJump(NodeEx node, FlowState state, Typ t, Ap ap, ApApprox apa) {

0 commit comments

Comments
 (0)