correct copy-paste note after refactorings

This commit is contained in:
Erik Krogh Kristensen
2020-08-07 17:48:55 +02:00
parent 8f06e9651f
commit 94cf3a8ddb
2 changed files with 2 additions and 2 deletions

View File

@@ -469,7 +469,6 @@ private module AsyncReturnSteps {
* A data-flow step for ordinary and exceptional returns from async functions.
*/
private class AsyncReturn extends PreCallGraphStep {
// Note: partially copy-paste from FlowSteps::CachedSteps::returnStep/2
override predicate storeStep(DataFlow::Node pred, DataFlow::SourceNode succ, string prop) {
exists(DataFlow::FunctionNode f | f.getFunction().isAsync() |
// ordinary return
@@ -478,6 +477,7 @@ private module AsyncReturnSteps {
succ = f.getReturnNode()
or
// exceptional return
// Note: partially copy-paste from FlowSteps::localExceptionStep/2
prop = errorProp() and
exists(Expr expr |
expr = any(ThrowStmt throw).getExpr() and

View File

@@ -61,6 +61,7 @@ predicate localFlowStep(
* Holds if an exception thrown from `pred` can propagate locally to `succ`.
*/
predicate localExceptionStep(DataFlow::Node pred, DataFlow::Node succ) {
// Note: FlowSteps::localExceptionStep/2 has copy-paste children
exists(Expr expr |
expr = any(ThrowStmt throw).getExpr() and
pred = expr.flow()
@@ -220,7 +221,6 @@ private module CachedSteps {
*/
cached
predicate returnStep(DataFlow::Node pred, DataFlow::Node succ) {
// Note: FlowSteps::CachedSteps::returnStep/2 has copy-paste children
exists(Function f | calls(succ, f) or callsBound(succ, f, _) |
DataFlow::functionReturnNode(pred, f)
or