mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Make use of getContainer
This commit is contained in:
@@ -36,7 +36,7 @@ class ActionDeclaration extends File {
|
||||
}
|
||||
|
||||
Expr getAFunctionChildExpr(Function f) {
|
||||
result = f.getBody().getAChildStmt*().getAChildExpr*()
|
||||
result.getContainer() = f
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -44,6 +44,8 @@ Expr getAFunctionChildExpr(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 {
|
||||
|
||||
Reference in New Issue
Block a user