Skip to content
Snippets Groups Projects
Commit fa157fc4 authored by Javier Costa's avatar Javier Costa
Browse files

PDG: Added Switch data dependency

parent b5773333
No related branches found
No related tags found
No related merge requests found
...@@ -68,6 +68,20 @@ public class DataDependencyVisitor extends VoidVisitorAdapter<Void> { ...@@ -68,6 +68,20 @@ public class DataDependencyVisitor extends VoidVisitorAdapter<Void> {
forEachStmt.getBody().accept(this, null); forEachStmt.getBody().accept(this, null);
} }
@Override
public void visit(SwitchStmt switchStmt, Void ignored) {
buildDataDependency(switchStmt);
switchStmt.getEntries().accept(this, null);
}
@Override
public void visit(SwitchEntryStmt switchEntryStmt, Void ignored) {
buildDataDependency(switchEntryStmt);
switchEntryStmt.getStatements().accept(this, null);
}
private void buildDataDependency(Statement statement) { private void buildDataDependency(Statement statement) {
buildDataDependency(pdgGraph.findNodeByASTNode(statement).get()); buildDataDependency(pdgGraph.findNodeByASTNode(statement).get());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment