Skip to content

Commit 50c57c2

Browse files
committed
PS: Drive-by: Assign a location to top-level functions.
1 parent 7c59a74 commit 50c57c2

File tree

1 file changed

+5
-0
lines changed
  • powershell/ql/lib/semmle/code/powershell/ast/internal

1 file changed

+5
-0
lines changed

powershell/ql/lib/semmle/code/powershell/ast/internal/Synthesis.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,11 @@ private module FunctionSynth {
440440
n = TFunctionSynth(fundefStmt, _) and
441441
result = fundefStmt.getLocation()
442442
)
443+
or
444+
exists(Raw::TopLevelScriptBlock topLevelScriptBlock |
445+
n = TTopLevelFunction(topLevelScriptBlock) and
446+
result = topLevelScriptBlock.getLocation()
447+
)
443448
}
444449
}
445450
}

0 commit comments

Comments
 (0)