Skip to content

Commit 563805f

Browse files
committed
Fix nodeGetEnclosingCallable
It wasn't updated when MkImplicitVarargsSlice was added as a branch of TNode. This meant that it gave no result for `ImplicitVarargsSlice`s in function calls used to initialise variables declared at file level.
1 parent a3cecd1 commit 563805f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module Private {
2121
DataFlowCallable nodeGetEnclosingCallable(Node n) {
2222
result.asCallable() = n.getEnclosingCallable()
2323
or
24-
(n = MkInstructionNode(_) or n = MkSsaNode(_) or n = MkGlobalFunctionNode(_)) and
24+
not n instanceof FlowSummaryNode and
2525
not exists(n.getEnclosingCallable()) and
2626
result.asFileScope() = n.getFile()
2727
or

0 commit comments

Comments
 (0)