Skip to content

Commit 868caf9

Browse files
committed
Rename {Source,Sink}Node to {Source,Sink}Element
1 parent 1b31c90 commit 868caf9

File tree

7 files changed

+68
-64
lines changed

7 files changed

+68
-64
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ private module TypesInput implements Impl::Private::TypesInputSig {
183183
)
184184
}
185185

186-
DataFlowType getSourceNodeType(Input::SourceBase source, Impl::Private::SummaryComponent sc) {
186+
DataFlowType getSourceType(Input::SourceBase source, Impl::Private::SummaryComponent sc) {
187187
none()
188188
}
189189

190-
DataFlowType getSinkNodeType(Input::SinkBase sink, Impl::Private::SummaryComponent sc) { none() }
190+
DataFlowType getSinkType(Input::SinkBase sink, Impl::Private::SummaryComponent sc) { none() }
191191
}
192192

193193
private module StepsInput implements Impl::Private::StepsInputSig {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ private module TypesInput implements Impl::Private::TypesInputSig {
130130
exists(rk)
131131
}
132132

133-
DataFlowType getSourceNodeType(Input::SourceBase source, Impl::Private::SummaryComponent sc) {
133+
DataFlowType getSourceType(Input::SourceBase source, Impl::Private::SummaryComponent sc) {
134134
none()
135135
}
136136

137-
DataFlowType getSinkNodeType(Input::SinkBase sink, Impl::Private::SummaryComponent sc) { none() }
137+
DataFlowType getSinkType(Input::SinkBase sink, Impl::Private::SummaryComponent sc) { none() }
138138
}
139139

140140
private module StepsInput implements Impl::Private::StepsInputSig {

rust/ql/lib/codeql/rust/dataflow/FlowSink.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ private module Sinks {
1313
/** Provides the `Range` class used to define the extent of `FlowSink`. */
1414
module FlowSink {
1515
/** A flow source. */
16-
abstract class Range extends Impl::Public::SinkNode {
16+
abstract class Range extends Impl::Public::SinkElement {
1717
bindingset[this]
1818
Range() { any() }
1919

rust/ql/lib/codeql/rust/dataflow/FlowSource.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ private module Sources {
1313
/** Provides the `Range` class used to define the extent of `FlowSource`. */
1414
module FlowSource {
1515
/** A flow source. */
16-
abstract class Range extends Impl::Public::SourceNode {
16+
abstract class Range extends Impl::Public::SourceElement {
1717
bindingset[this]
1818
Range() { any() }
1919

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

+11-9
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,15 @@ module Node {
191191
result = this.getSummaryNode().getSummarizedCallable()
192192
}
193193

194-
/** Gets the source node that this node belongs to, if any */
195-
FlowSummaryImpl::Public::SourceNode getSourceNode() {
196-
result = this.getSummaryNode().getSourceNode()
194+
/** Gets the AST source node that this node belongs to, if any */
195+
FlowSummaryImpl::Public::SourceElement getSourceElement() {
196+
result = this.getSummaryNode().getSourceElement()
197197
}
198198

199-
/** Gets the sink node that this node belongs to, if any */
200-
FlowSummaryImpl::Public::SinkNode getSinkNode() { result = this.getSummaryNode().getSinkNode() }
199+
/** Gets the AST sink node that this node belongs to, if any */
200+
FlowSummaryImpl::Public::SinkElement getSinkElement() {
201+
result = this.getSummaryNode().getSinkElement()
202+
}
201203

202204
/** Holds is this node is a source node of kind `kind`. */
203205
predicate isSource(string kind) {
@@ -210,9 +212,9 @@ module Node {
210212
}
211213

212214
override CfgScope getCfgScope() {
213-
result = this.getSummaryNode().getSourceNode().getEnclosingCfgScope()
215+
result = this.getSummaryNode().getSourceElement().getEnclosingCfgScope()
214216
or
215-
result = this.getSummaryNode().getSinkNode().getEnclosingCfgScope()
217+
result = this.getSummaryNode().getSinkElement().getEnclosingCfgScope()
216218
}
217219

218220
override DataFlowCallable getEnclosingCallable() {
@@ -225,9 +227,9 @@ module Node {
225227
exists(this.getSummarizedCallable()) and
226228
result instanceof EmptyLocation
227229
or
228-
result = this.getSourceNode().getLocation()
230+
result = this.getSourceElement().getLocation()
229231
or
230-
result = this.getSinkNode().getLocation()
232+
result = this.getSinkElement().getLocation()
231233
}
232234

233235
override string toString() { result = this.getSummaryNode().toString() }

rust/ql/lib/utils/test/InlineFlowTest.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private module FlowTestImpl implements InputSig<Location, RustDataFlow> {
3434
or
3535
sourceNode(src, _) and
3636
exists(CallExprBase call |
37-
call = src.(Node::FlowSummaryNode).getSourceNode().getCall() and
37+
call = src.(Node::FlowSummaryNode).getSourceElement().getCall() and
3838
result = call.getArgList().getArg(0).toString()
3939
)
4040
}

0 commit comments

Comments
 (0)