Skip to content

Commit 1a000ec

Browse files
committed
Rust: Make minor data flow changes based on PR feedback
1 parent dadc605 commit 1a000ec

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ abstract class DataFlowCall extends TDataFlowCall {
4949
/** Gets the underlying source code call, if any. */
5050
abstract CallCfgNode asCall();
5151

52+
/** Gets a textual representation of this call. */
5253
abstract string toString();
5354

5455
/** Gets the location of this call. */
@@ -189,14 +190,14 @@ module Node {
189190

190191
/** A data flow node that represents a value returned by a callable. */
191192
final class ReturnNode extends ExprNode {
192-
ReturnNode() { this.getCfgNode().getASuccessor() instanceof ExitCfgNode }
193+
ReturnNode() { this.asExpr() instanceof ReturnExpr }
193194

194195
ReturnKind getKind() { any() }
195196
}
196197

197198
/** A data-flow node that represents the output of a call. */
198199
abstract class OutNode extends Node, ExprNode {
199-
/** Gets the underlying call, where this node is a corresponding output of kind `kind`. */
200+
/** Gets the underlying call for this node. */
200201
abstract DataFlowCall getCall();
201202
}
202203

@@ -284,11 +285,11 @@ module LocalFlow {
284285
}
285286
}
286287

287-
class DataFlowCallableAlias = DataFlowCallable;
288+
private class DataFlowCallableAlias = DataFlowCallable;
288289

289-
class ReturnKindAlias = ReturnKind;
290+
private class ReturnKindAlias = ReturnKind;
290291

291-
class DataFlowCallAlias = DataFlowCall;
292+
private class DataFlowCallAlias = DataFlowCall;
292293

293294
module RustDataFlow implements InputSig<Location> {
294295
/**

rust/ql/test/extractor-tests/generated/ClosureExpr/CONSISTENCY/DataFlowConsistency.expected

Whitespace-only changes.

rust/ql/test/extractor-tests/generated/Function/CONSISTENCY/DataFlowConsistency.expected

Whitespace-only changes.

rust/ql/test/extractor-tests/generated/MatchArm/CONSISTENCY/DataFlowConsistency.expected

Whitespace-only changes.

rust/ql/test/extractor-tests/generated/MatchExpr/CONSISTENCY/DataFlowConsistency.expected

Whitespace-only changes.

0 commit comments

Comments
 (0)