Ruby: rename EntryPoint.getAUse,getARhs -> getASource,getASink

This commit is contained in:
Asger F
2022-09-02 13:03:37 +02:00
parent 48761b8667
commit c9ba6f171b
2 changed files with 13 additions and 7 deletions

View File

@@ -382,11 +382,17 @@ module API {
bindingset[this]
EntryPoint() { any() }
/** DEPRECATED. This predicate has been renamed to `getASource`. */
deprecated DataFlow::LocalSourceNode getAUse() { none() }
/** DEPRECATED. This predicate has been renamed to `getASink`. */
deprecated DataFlow::Node getARhs() { none() }
/** Gets a data-flow node corresponding to a use-node for this entry point. */
DataFlow::LocalSourceNode getAUse() { none() }
DataFlow::LocalSourceNode getASource() { none() }
/** Gets a data-flow node corresponding to a def-node for this entry point. */
DataFlow::Node getARhs() { none() }
DataFlow::Node getASink() { none() }
/** Gets a call corresponding to a method access node for this entry point. */
DataFlow::CallNode getACall() { none() }
@@ -504,7 +510,7 @@ module API {
or
parameterStep(_, defCand(), nd)
or
nd = any(EntryPoint entry).getAUse()
nd = any(EntryPoint entry).getASource()
or
nd = any(EntryPoint entry).getACall()
}
@@ -553,7 +559,7 @@ module API {
// If a call node is relevant as a use-node, treat its arguments as def-nodes
argumentStep(_, useCandFwd(), rhs)
or
rhs = any(EntryPoint entry).getARhs()
rhs = any(EntryPoint entry).getASink()
}
/** Gets a data flow node that flows to the RHS of a def-node. */
@@ -712,9 +718,9 @@ module API {
pred = root() and
lbl = Label::entryPoint(entry)
|
succ = MkDef(entry.getARhs())
succ = MkDef(entry.getASink())
or
succ = MkUse(entry.getAUse())
succ = MkUse(entry.getASource())
or
succ = MkMethodAccessNode(entry.getACall())
)

View File

@@ -12,7 +12,7 @@ class CustomEntryPointCall extends API::EntryPoint {
class CustomEntryPointUse extends API::EntryPoint {
CustomEntryPointUse() { this = "CustomEntryPointUse" }
override DataFlow::LocalSourceNode getAUse() {
override DataFlow::LocalSourceNode getASource() {
result.(DataFlow::CallNode).getMethodName() = "customEntryPointUse"
}
}