mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
correct copy-paste note after refactorings
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user