diff --git a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/ControlFlowSensitiveDFGPass.kt b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/ControlFlowSensitiveDFGPass.kt index cd1c3046afd..5faf53fc1db 100644 --- a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/ControlFlowSensitiveDFGPass.kt +++ b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/ControlFlowSensitiveDFGPass.kt @@ -115,7 +115,7 @@ open class ControlFlowSensitiveDFGPass(ctx: TranslationContext) : TranslationUni * It further determines unnecessary implicit return statement which are added by some frontends * even if every path reaching this point already contains a return statement. */ - protected fun transfer( + protected open fun transfer( currentEdge: PropertyEdge, state: State>, worklist: Worklist, Node, Set> @@ -338,7 +338,7 @@ open class ControlFlowSensitiveDFGPass(ctx: TranslationContext) : TranslationUni lastStatement.removeNextDFG(node) } - private fun unwrapReference(node: Node?): Reference? { + protected fun unwrapReference(node: Node?): Reference? { return if (node is Reference) node else if (node is UnaryOperator && (node.operatorCode == "*" || node.operatorCode == "&")) unwrapReference(node.input) diff --git a/cpg-language-cxx/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/cxx/CXXLanguageFrontend.kt b/cpg-language-cxx/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/cxx/CXXLanguageFrontend.kt index 27e8dcee9f8..6cadd017891 100644 --- a/cpg-language-cxx/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/cxx/CXXLanguageFrontend.kt +++ b/cpg-language-cxx/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/cxx/CXXLanguageFrontend.kt @@ -80,7 +80,7 @@ import org.slf4j.LoggerFactory */ @RegisterExtraPass(DynamicInvokeResolver::class) @RegisterExtraPass(CXXExtraPass::class) -class CXXLanguageFrontend(language: Language, ctx: TranslationContext) : +open class CXXLanguageFrontend(language: Language, ctx: TranslationContext) : LanguageFrontend(language, ctx) { /**