Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ private ExprCfgNode getALastEvalNode(ExprCfgNode e) {

/**
* Holds if a reverse local flow step should be added from the post-update node
* for `e` to the post-update node for the result.
* for `e` to the post-update node for the result. `preservesValue` is true
* if the step is value preserving.
*
* This is needed to allow for side-effects on compound expressions to propagate
* to sub components. For example, in
Expand Down
9 changes: 6 additions & 3 deletions rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ private import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprB

/**
* Holds if in a call to the function with canonical path `path`, the value referred
* to by `output` is a flow source of the given `kind`.
* to by `output` is a flow source of the given `kind` and `madId` is the data
* extension row number.
*
* `output = "ReturnValue"` simply means the result of the call itself.
*
Expand All @@ -64,7 +65,8 @@ extensible predicate sourceModel(

/**
* Holds if in a call to the function with canonical path `path`, the value referred
* to by `input` is a flow sink of the given `kind`.
* to by `input` is a flow sink of the given `kind` and `madId` is the data
* extension row number.
*
* For example, `input = Argument[0]` means the first argument of the call.
*
Expand All @@ -77,7 +79,8 @@ extensible predicate sinkModel(

/**
* Holds if in a call to the function with canonical path `path`, the value referred
* to by `input` can flow to the value referred to by `output`.
* to by `input` can flow to the value referred to by `output` and `madId` is the data
* extension row number.
*
* `kind` should be either `value` or `taint`, for value-preserving or taint-preserving
* steps, respectively.
Expand Down
3 changes: 1 addition & 2 deletions rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,10 @@ module Impl {
}

class CallExprMethodCall extends Call instanceof CallExpr {
Path qualifier;
string methodName;
boolean selfIsRef;

CallExprMethodCall() { callIsMethodCall(this, qualifier, methodName, selfIsRef) }
CallExprMethodCall() { callIsMethodCall(this, _, methodName, selfIsRef) }

/**
* Holds if this call must have an explicit borrow for the `self` argument,
Expand Down
4 changes: 1 addition & 3 deletions rust/ql/lib/codeql/rust/internal/Type.qll
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,7 @@ final class TypeBoundTypeAbstraction extends TypeAbstraction, TypeBound {
}

final class SelfTypeBoundTypeAbstraction extends TypeAbstraction, Name {
private TraitTypeAbstraction trait;

SelfTypeBoundTypeAbstraction() { trait.getName() = this }
SelfTypeBoundTypeAbstraction() { any(TraitTypeAbstraction trait).getName() = this }

override TypeParameter getATypeParameter() { none() }
}
Expand Down