Skip to content

Commit da72ba4

Browse files
committed
Data flow: Add stub expectsContent for all languages
1 parent 6e2e844 commit da72ba4

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ predicate clearsContent(Node n, Content c) {
198198
none() // stub implementation
199199
}
200200

201+
/**
202+
* Holds if the value that is being tracked is expected to be stored inside content `c`
203+
* at node `n`.
204+
*/
205+
predicate expectsContent(Node n, ContentSet c) { none() }
206+
201207
/** Gets the type of `n` used for type pruning. */
202208
Type getNodeType(Node n) {
203209
suppressUnusedNode(n) and

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ predicate clearsContent(Node n, Content c) {
279279
none() // stub implementation
280280
}
281281

282+
/**
283+
* Holds if the value that is being tracked is expected to be stored inside content `c`
284+
* at node `n`.
285+
*/
286+
predicate expectsContent(Node n, ContentSet c) { none() }
287+
282288
/** Gets the type of `n` used for type pruning. */
283289
IRType getNodeType(Node n) {
284290
suppressUnusedNode(n) and

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,12 @@ predicate clearsContent(Node n, Content c) {
17141714
)
17151715
}
17161716

1717+
/**
1718+
* Holds if the value that is being tracked is expected to be stored inside content `c`
1719+
* at node `n`.
1720+
*/
1721+
predicate expectsContent(Node n, ContentSet c) { none() }
1722+
17171723
/**
17181724
* Holds if the node `n` is unreachable when the call context is `call`.
17191725
*/

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ predicate clearsContent(Node n, Content c) {
160160
FlowSummaryImpl::Private::Steps::summaryClearsContent(n, c)
161161
}
162162

163+
/**
164+
* Holds if the value that is being tracked is expected to be stored inside content `c`
165+
* at node `n`.
166+
*/
167+
predicate expectsContent(Node n, ContentSet c) { none() }
168+
163169
/**
164170
* Gets a representative (boxed) type for `t` for the purpose of pruning
165171
* possible flow. A single type is used for all numeric types to account for

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,12 @@ predicate clearsContent(Node n, Content c) {
813813
attributeClearStep(n, c)
814814
}
815815

816+
/**
817+
* Holds if the value that is being tracked is expected to be stored inside content `c`
818+
* at node `n`.
819+
*/
820+
predicate expectsContent(Node n, ContentSet c) { none() }
821+
816822
/**
817823
* Holds if values stored inside attribute `c` are cleared at node `n`.
818824
*

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,12 @@ predicate clearsContent(Node n, ContentSet c) {
800800
FlowSummaryImpl::Private::Steps::summaryClearsContent(n, c)
801801
}
802802

803+
/**
804+
* Holds if the value that is being tracked is expected to be stored inside content `c`
805+
* at node `n`.
806+
*/
807+
predicate expectsContent(Node n, ContentSet c) { none() }
808+
803809
private newtype TDataFlowType =
804810
TTodoDataFlowType() or
805811
TTodoDataFlowType2() // Add a dummy value to prevent bad functionality-induced joins arising from a type of size 1.

0 commit comments

Comments
 (0)