Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,13 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {

predicate returnMayFlowThrough(RetNd ret, ReturnKindExt kind);

/**
* Holds if this stage makes use of a store step of content `c` from
* `node1` to `node2`.
*
* `contentType` and `containerType` are the types of the content being
* stored, and the type of the resulting container, respectively.
*/
predicate storeStepCand(Nd node1, Content c, Nd node2, Type contentType, Type containerType);

predicate readStepCand(Nd n1, Content c, Nd n2);
Expand Down Expand Up @@ -486,6 +493,14 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
)
}

/**
* Holds if a node with type `containerType` is compatible with an
* access path with head content `apc`. This is determined by checking
* type compatibility against the possible types of nodes that are
* targets of store steps with content `apc`.
*
* Excludes the case where `apc` is compatible with all types.
*/
bindingset[apc, containerType]
pragma[inline_late]
private predicate compatibleContainer(ApHeadContent apc, Type containerType) {
Expand Down
Loading