Skip to content

Commit f0ec43b

Browse files
committed
Swift: remove getMethodDeclaration
`getStaticTarget` gives the same result.
1 parent 66459b8 commit f0ec43b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

swift/ql/lib/codeql/swift/elements/expr/ApplyExpr.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ class ApplyExpr extends ApplyExprBase {
1111
(
1212
result = f.(DeclRefExpr).getDecl()
1313
or
14-
result = f.(MethodRefExpr).getMethod()
15-
or
1614
result = f.(ConstructorRefCallExpr).getFunction().(DeclRefExpr).getDecl()
1715
)
1816
)
@@ -34,7 +32,7 @@ class MethodApplyExpr extends ApplyExpr {
3432

3533
MethodApplyExpr() { method = this.getFunction() }
3634

37-
AbstractFunctionDecl getMethodDeclaration() { result = method.getMethod() }
35+
override AbstractFunctionDecl getStaticTarget() { result = method.getMethod() }
3836

3937
override Expr getQualifier() { result = method.getBase() }
4038
}

0 commit comments

Comments
 (0)