mirror of
https://github.com/github/codeql.git
synced 2026-01-29 14:23:03 +01:00
Remove CallExpr.getACallee().
This commit is contained in:
@@ -466,21 +466,6 @@ class CallExpr extends CallOrConversionExpr {
|
||||
/** Gets the declared target of this call. */
|
||||
Function getTarget() { this = result.getACallExpr() }
|
||||
|
||||
/**
|
||||
* Gets the definition of a possible target of this call.
|
||||
*
|
||||
* For non-virtual calls, there is at most one possible call target (but there may be none if the
|
||||
* target has no declaration).
|
||||
*
|
||||
* For virtual calls, we look up possible targets in all types that implement the receiver
|
||||
* interface type.
|
||||
*/
|
||||
FuncDef getACallee() {
|
||||
exists(DataFlow::CallNode call | call.asExpr() = this |
|
||||
result = call.getACallee()
|
||||
)
|
||||
}
|
||||
|
||||
override predicate mayHaveOwnSideEffects() {
|
||||
getTarget().mayHaveSideEffects() or
|
||||
not exists(getTarget())
|
||||
|
||||
@@ -7,7 +7,9 @@ DataFlowCallable viableImpl(DataFlowCall ma) { result = viableCallable(ma) }
|
||||
* Gets a function that might be called by `call`.
|
||||
*/
|
||||
DataFlowCallable viableCallable(CallExpr ma) {
|
||||
result = ma.getACallee()
|
||||
exists(DataFlow::CallNode c | c.asExpr() = ma |
|
||||
result = c.getACallee()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user