Skip to content

Commit 568de02

Browse files
hvitvedaschackmull
andauthored
Update shared/typeflow/codeql/typeflow/UniversalFlow.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
1 parent 651770b commit 568de02

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

shared/typeflow/codeql/typeflow/UniversalFlow.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,12 @@ module Make<LocationSig Location, UniversalFlowInput<Location> I> {
155155
private module RankEdge<Edge E> implements RankedEdge<E::Node> {
156156
private import E
157157

158+
private predicate needsNodeId(FlowNode n) { edge(n, _) }
159+
158160
private int getFlowNodeIdByLoc(FlowNode n) {
159161
n =
160162
rank[result](FlowNode n0, string filePath, int startline, int startcolumn |
163+
needsNodeId(n0) and
161164
not exists(getFlowNodeId(n0)) and
162165
n0.getLocation().hasLocationInfo(filePath, startline, startcolumn, _, _)
163166
|
@@ -168,6 +171,7 @@ module Make<LocationSig Location, UniversalFlowInput<Location> I> {
168171
private int getFlowNodeIdExt(FlowNode n) {
169172
n =
170173
rank[result](FlowNode n0, int a, int b |
174+
needsNodeId(n0) and
171175
a = 0 and
172176
b = getFlowNodeId(n0)
173177
or

0 commit comments

Comments
 (0)