Skip to content

Commit 7eefa43

Browse files
committed
Rename and document viableArgParamSpecific to make clear it is a temporary hook.
1 parent 1706367 commit 7eefa43

File tree

16 files changed

+35
-23
lines changed

16 files changed

+35
-23
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowDispatch.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { ppos =
8383
/**
8484
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
8585
*
86-
* This is a filter on top of the language-neutral argument/parameter matching implemented by `viableParamArg`.
86+
* This is a temporary hook to support technical debt in the Go language; do not use.
8787
*/
8888
pragma[inline]
89-
predicate viableParamArgSpecific(DataFlowCall call, ParameterNode p, ArgumentNode arg) { any() }
89+
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
90+
any()
91+
}

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ private module Cached {
426426
viableParam(call, ppos, p) and
427427
argumentPositionMatch(call, arg, ppos) and
428428
compatibleTypes(getNodeDataFlowType(arg), getNodeDataFlowType(p)) and
429-
viableParamArgSpecific(call, p, arg)
429+
golangSpecificParamArgFilter(call, p, arg)
430430
)
431431
}
432432

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowDispatch.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { ppos =
275275
/**
276276
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
277277
*
278-
* This is a filter on top of the language-neutral argument/parameter matching implemented by `viableParamArg`.
278+
* This is a temporary hook to support technical debt in the Go language; do not use.
279279
*/
280280
pragma[inline]
281-
predicate viableParamArgSpecific(DataFlowCall call, ParameterNode p, ArgumentNode arg) { any() }
281+
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
282+
any()
283+
}

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ private module Cached {
426426
viableParam(call, ppos, p) and
427427
argumentPositionMatch(call, arg, ppos) and
428428
compatibleTypes(getNodeDataFlowType(arg), getNodeDataFlowType(p)) and
429-
viableParamArgSpecific(call, p, arg)
429+
golangSpecificParamArgFilter(call, p, arg)
430430
)
431431
}
432432

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,9 @@ predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) {
559559
/**
560560
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
561561
*
562-
* This is a filter on top of the language-neutral argument/parameter matching implemented by `viableParamArg`.
562+
* This is a temporary hook to support technical debt in the Go language; do not use.
563563
*/
564564
pragma[inline]
565-
predicate viableParamArgSpecific(DataFlowCall call, ParameterNode p, ArgumentNode arg) { any() }
565+
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
566+
any()
567+
}

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ private module Cached {
426426
viableParam(call, ppos, p) and
427427
argumentPositionMatch(call, arg, ppos) and
428428
compatibleTypes(getNodeDataFlowType(arg), getNodeDataFlowType(p)) and
429-
viableParamArgSpecific(call, p, arg)
429+
golangSpecificParamArgFilter(call, p, arg)
430430
)
431431
}
432432

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private predicate isInterfaceMethod(Method c) {
143143
* a receiver parameter to a concrete method.
144144
*/
145145
pragma[inline]
146-
predicate viableParamArgSpecific(
146+
predicate golangSpecificParamArgFilter(
147147
DataFlowCall call, DataFlow::ParameterNode p, DataFlow::ArgumentNode arg
148148
) {
149149
// Interface methods calls may be passed strictly to that exact method's model receiver:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ private module Cached {
426426
viableParam(call, ppos, p) and
427427
argumentPositionMatch(call, arg, ppos) and
428428
compatibleTypes(getNodeDataFlowType(arg), getNodeDataFlowType(p)) and
429-
viableParamArgSpecific(call, p, arg)
429+
golangSpecificParamArgFilter(call, p, arg)
430430
)
431431
}
432432

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowDispatch.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,12 @@ private module DispatchImpl {
175175
/**
176176
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
177177
*
178-
* This is a filter on top of the language-neutral argument/parameter matching implemented by `viableParamArg`.
178+
* This is a temporary hook to support technical debt in the Go language; do not use.
179179
*/
180180
pragma[inline]
181-
predicate viableParamArgSpecific(DataFlowCall call, ParameterNode p, ArgumentNode arg) { any() }
181+
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
182+
any()
183+
}
182184
}
183185

184186
import DispatchImpl

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ private module Cached {
426426
viableParam(call, ppos, p) and
427427
argumentPositionMatch(call, arg, ppos) and
428428
compatibleTypes(getNodeDataFlowType(arg), getNodeDataFlowType(p)) and
429-
viableParamArgSpecific(call, p, arg)
429+
golangSpecificParamArgFilter(call, p, arg)
430430
)
431431
}
432432

0 commit comments

Comments
 (0)