Skip to content

Commit 05314b4

Browse files
committed
C++: Add stub.
1 parent 6e8a2a6 commit 05314b4

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,3 +565,19 @@ private class MyConsistencyConfiguration extends Consistency::ConsistencyConfigu
565565
any()
566566
}
567567
}
568+
569+
/**
570+
* Gets an additional term that is added to the `join` and `branch` computations to reflect
571+
* an additional forward or backwards branching factor that is not taken into account
572+
* when calculating the (virtual) dispatch cost.
573+
*
574+
* `call` is a call with an argument `arg` that is part of a path from a source to a sink, and
575+
* `p` is the target parameter of a callable to which `call` may resolve.
576+
*
577+
* All these values are bound by the dataflow library, and if this predicate is implemented it
578+
* should be specified with a bindingset annotation that binds all the columns.
579+
*/
580+
bindingset[call, p, arg]
581+
int getAdditionalFlowIntoCallNodeTerm(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
582+
none()
583+
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,3 +318,19 @@ private class MyConsistencyConfiguration extends Consistency::ConsistencyConfigu
318318
// consistency alerts enough that most of them are interesting.
319319
}
320320
}
321+
322+
/**
323+
* Gets an additional term that is added to the `join` and `branch` computations to reflect
324+
* an additional forward or backwards branching factor that is not taken into account
325+
* when calculating the (virtual) dispatch cost.
326+
*
327+
* `call` is a call with an argument `arg` that is part of a path from a source to a sink, and
328+
* `p` is the target parameter of a callable to which `call` may resolve.
329+
*
330+
* All these values are bound by the dataflow library, and if this predicate is implemented it
331+
* should be specified with a bindingset annotation that binds all the columns.
332+
*/
333+
bindingset[call, p, arg]
334+
int getAdditionalFlowIntoCallNodeTerm(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
335+
none()
336+
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,3 +414,19 @@ private class MyConsistencyConfiguration extends Consistency::ConsistencyConfigu
414414
any()
415415
}
416416
}
417+
418+
/**
419+
* Gets an additional term that is added to the `join` and `branch` computations to reflect
420+
* an additional forward or backwards branching factor that is not taken into account
421+
* when calculating the (virtual) dispatch cost.
422+
*
423+
* `call` is a call with an argument `arg` that is part of a path from a source to a sink, and
424+
* `p` is the target parameter of a callable to which `call` may resolve.
425+
*
426+
* All these values are bound by the dataflow library, and if this predicate is implemented it
427+
* should be specified with a bindingset annotation that binds all the columns.
428+
*/
429+
bindingset[call, p, arg]
430+
int getAdditionalFlowIntoCallNodeTerm(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
431+
none()
432+
}

0 commit comments

Comments
 (0)