Skip to content

Commit 003edea

Browse files
authored
Merge pull request github#11706 from owen-mc/fix/go-callback-type-stubs-2
Go: Use any() to stub getCallbackParameter/ReturnType and getSyntheticGlobalType
2 parents 32800bc + 76a3fa8 commit 003edea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,17 @@ DataFlowType getReturnType(SummarizedCallable c, ReturnKind rk) { any() }
4646
* Gets the type of the `i`th parameter in a synthesized call that targets a
4747
* callback of type `t`.
4848
*/
49-
DataFlowType getCallbackParameterType(DataFlowType t, int i) { none() }
49+
bindingset[t, pos]
50+
DataFlowType getCallbackParameterType(DataFlowType t, ArgumentPosition pos) { any() }
5051

5152
/**
5253
* Gets the return type of kind `rk` in a synthesized call that targets a
5354
* callback of type `t`.
5455
*/
55-
DataFlowType getCallbackReturnType(DataFlowType t, ReturnKind rk) { none() }
56+
DataFlowType getCallbackReturnType(DataFlowType t, ReturnKind rk) { any() }
5657

5758
/** Gets the type of synthetic global `sg`. */
58-
DataFlowType getSyntheticGlobalType(SummaryComponent::SyntheticGlobal sg) { none() }
59+
DataFlowType getSyntheticGlobalType(SummaryComponent::SyntheticGlobal sg) { any() }
5960

6061
/**
6162
* Holds if an external flow summary exists for `c` with input specification

0 commit comments

Comments
 (0)