mirror of
https://github.com/github/codeql.git
synced 2026-02-11 20:51:06 +01:00
C#: Revert change to getASummarizedCallableTarget
This commit is contained in:
@@ -371,9 +371,21 @@ class NonDelegateDataFlowCall extends DataFlowCall, TNonDelegateCall {
|
||||
/** Gets the underlying call. */
|
||||
DispatchCall getDispatchCall() { result = dc }
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate hasSourceTarget() { dc.getAStaticTarget().fromSource() }
|
||||
|
||||
pragma[nomagic]
|
||||
private FlowSummary::SummarizedCallable getASummarizedCallableTarget() {
|
||||
result = this.getATarget(_)
|
||||
// Only use summarized callables with generated summaries in case
|
||||
// we are not able to dispatch to a source declaration.
|
||||
exists(boolean static |
|
||||
result = this.getATarget(static) and
|
||||
if this.hasSourceTarget() then result.hasManualModel() else any()
|
||||
|
|
||||
static = false
|
||||
or
|
||||
static = true and not result instanceof RuntimeCallable
|
||||
)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
|
||||
Reference in New Issue
Block a user