Skip to content

Commit

Permalink
now with identityset
Browse files Browse the repository at this point in the history
  • Loading branch information
morbitzer authored and oxisto committed Dec 30, 2023
1 parent fc96dfc commit e636321
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import de.fraunhofer.aisec.cpg.graph.declarations.ValueDeclaration
import de.fraunhofer.aisec.cpg.graph.edge.DependenceType
import de.fraunhofer.aisec.cpg.graph.edge.PropertyEdge
import de.fraunhofer.aisec.cpg.graph.statements.expressions.Reference
import de.fraunhofer.aisec.cpg.helpers.identitySetOf
import de.fraunhofer.aisec.cpg.passes.order.DependsOn
import de.fraunhofer.aisec.cpg.processing.IVisitor
import de.fraunhofer.aisec.cpg.processing.strategy.Strategy
Expand Down Expand Up @@ -97,7 +98,7 @@ class ProgramDependenceGraphPass(ctx: TranslationContext) : TranslationUnitPass(

private fun allEOGsFromToFlowThrough(from: Node, to: Node, through: Node): Boolean {
val worklist = mutableListOf(from)
val alreadySeenNodes = mutableSetOf<Node>()
val alreadySeenNodes = identitySetOf<Node>()

while (worklist.isNotEmpty()) {
val currentStatus = worklist.removeFirst()
Expand Down

0 comments on commit e636321

Please sign in to comment.