Skip to content

Commit 0bf5238

Browse files
committed
Update QL doc for allowParameterReturnInSelf
1 parent 53d4d72 commit 0bf5238

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,10 @@ predicate lambdaCall(DataFlowCall call, LambdaCallKind kind, Node receiver) { no
289289
predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preservesValue) { none() }
290290

291291
/**
292-
* Holds if flow is allowed to pass from parameter `p`, to a return
293-
* node, and back out to `p`.
292+
* Holds if flow is allowed to pass from parameter `p` and back to itself as a
293+
* side-effect, resulting in a summary from `p` to itself.
294+
*
295+
* One example would be to allow flow like `p.foo = p.bar;`, which is disallowed
296+
* by default as a heuristic.
294297
*/
295298
predicate allowParameterReturnInSelf(ParameterNode p) { none() }

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,10 @@ predicate lambdaCall(DataFlowCall call, LambdaCallKind kind, Node receiver) { no
509509
predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preservesValue) { none() }
510510

511511
/**
512-
* Holds if flow is allowed to pass from parameter `p`, to a return
513-
* node, and back out to `p`.
512+
* Holds if flow is allowed to pass from parameter `p` and back to itself as a
513+
* side-effect, resulting in a summary from `p` to itself.
514+
*
515+
* One example would be to allow flow like `p.foo = p.bar;`, which is disallowed
516+
* by default as a heuristic.
514517
*/
515518
predicate allowParameterReturnInSelf(ParameterNode p) { none() }

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,8 +2015,11 @@ predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preserves
20152015
}
20162016

20172017
/**
2018-
* Holds if flow is allowed to pass from parameter `p`, to a return
2019-
* node, and back out to `p`.
2018+
* Holds if flow is allowed to pass from parameter `p` and back to itself as a
2019+
* side-effect, resulting in a summary from `p` to itself.
2020+
*
2021+
* One example would be to allow flow like `p.foo = p.bar;`, which is disallowed
2022+
* by default as a heuristic.
20202023
*/
20212024
predicate allowParameterReturnInSelf(ParameterNode p) {
20222025
FlowSummaryImpl::Private::summaryAllowParameterReturnInSelf(p)

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,11 @@ predicate lambdaCall(DataFlowCall call, LambdaCallKind kind, Node receiver) {
367367
predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preservesValue) { none() }
368368

369369
/**
370-
* Holds if flow is allowed to pass from parameter `p`, to a return
371-
* node, and back out to `p`.
370+
* Holds if flow is allowed to pass from parameter `p` and back to itself as a
371+
* side-effect, resulting in a summary from `p` to itself.
372+
*
373+
* One example would be to allow flow like `p.foo = p.bar;`, which is disallowed
374+
* by default as a heuristic.
372375
*/
373376
predicate allowParameterReturnInSelf(ParameterNode p) {
374377
FlowSummaryImpl::Private::summaryAllowParameterReturnInSelf(p)

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,10 @@ predicate lambdaCall(DataFlowCall call, LambdaCallKind kind, Node receiver) { no
16661666
predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preservesValue) { none() }
16671667

16681668
/**
1669-
* Holds if flow is allowed to pass from parameter `p`, to a return
1670-
* node, and back out to `p`.
1669+
* Holds if flow is allowed to pass from parameter `p` and back to itself as a
1670+
* side-effect, resulting in a summary from `p` to itself.
1671+
*
1672+
* One example would be to allow flow like `p.foo = p.bar;`, which is disallowed
1673+
* by default as a heuristic.
16711674
*/
16721675
predicate allowParameterReturnInSelf(ParameterNode p) { none() }

0 commit comments

Comments
 (0)