Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion queries/undeclared-action-input.ql
@@ -36,14 +36,16 @@ class ActionDeclaration extends File {
}

Expr getAFunctionChildExpr(Function f) {
result = f.getBody().getAChildStmt*().getAChildExpr*()
result.getContainer() = f
}

/*
* Result is a function that is called from the body of the given function `f`
*/
Function calledBy(Function f) {
result = getAFunctionChildExpr(f).(InvokeExpr).getResolvedCallee()
or
result.getEnclosingContainer() = f // assume outer function causes inner function to be called
}

class GetInputMethodCallExpr extends MethodCallExpr {

0 comments on commit dcd81b5

Please sign in to comment.