Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
KuechA committed Mar 12, 2024
1 parent 2eeb5de commit 8e0d577
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/DFGPass.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,6 @@ class DFGPass(ctx: TranslationContext) : ComponentPass(ctx) {
for (tu in component.translationUnits) {
walker.iterate(tu)
}

// connectInferredCallArguments(config.functionSummaries)
}

/**
* For inferred functions which have function summaries encoded, we connect the arguments to
* modified parameter to propagate the changes to the arguments out of the [FunctionDeclaration]
* again.
*/
private fun connectInferredCallArguments(functionSummaries: DFGFunctionSummaries) {
for (call in callsInferredFunctions) {
for (invoked in call.invokes.filter { it.isInferred }) {
val changedParams =
functionSummaries.functionToChangedParameters[invoked] ?: mapOf()
for ((param, _) in changedParams) {
if (param == (invoked as? MethodDeclaration)?.receiver) {
(call as? MemberCallExpression)
?.base
?.addPrevDFGContext(param, CallingContextOut(call))
} else if (param is ParameterDeclaration) {
val arg = call.arguments[param.argumentIndex]
arg.addPrevDFGContext(param, CallingContextOut(call))
// (arg as? Reference)?.access = AccessValues.READWRITE
}
}
}
}
}

override fun cleanup() {
Expand Down

0 comments on commit 8e0d577

Please sign in to comment.