Skip to content

Commit ec2cc5a

Browse files
committed
C#: Refactor how simpleLocalFlowStep is called
`localFlowStep` is no longer an alias because it should not have the same QLDoc as `simpleLocalFlowStep`.
1 parent c9ea5ad commit ec2cc5a

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,6 @@ module LocalFlow {
220220
}
221221
}
222222

223-
/**
224-
* Holds if data flows from `nodeFrom` to `nodeTo` in exactly one local
225-
* (intra-procedural) step.
226-
*/
227-
predicate localFlowStepImpl(Node nodeFrom, Node nodeTo) {
228-
simpleLocalFlowStep(nodeFrom, nodeTo)
229-
}
230-
231223
/** A collection of cached types and predicates to be evaluated in the same stage. */
232224
cached
233225
private module Cached {
@@ -258,8 +250,6 @@ private module Cached {
258250
TMallocNode(ControlFlow::Nodes::ElementNode cfn) { cfn.getElement() instanceof ObjectCreation }
259251

260252
/**
261-
* INTERNAL: do not use.
262-
*
263253
* This is the local flow predicate that's used as a building block in global
264254
* data flow. It may have less flow than the `localFlowStep` predicate.
265255
*/

csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ ExprNode exprNode(DotNet::Expr e) { result.getExpr() = e }
147147
*/
148148
ParameterNode parameterNode(DotNet::Parameter p) { result.getParameter() = p }
149149

150-
predicate localFlowStep = localFlowStepImpl/2;
150+
/**
151+
* Holds if data flows from `nodeFrom` to `nodeTo` in exactly one local
152+
* (intra-procedural) step.
153+
*/
154+
predicate localFlowStep(Node nodeFrom, Node nodeTo) { simpleLocalFlowStep(nodeFrom, nodeTo) }
151155

152156
/**
153157
* Holds if data flows from `source` to `sink` in zero or more local

0 commit comments

Comments
 (0)