Closed jasonforal closed 1 month ago
https://github.com/DataDog/datadog-static-analyzer/pull/512 Introduced phi nodes to correctly model the control flow graph for Java. To keep that PR as small as possible, only if_statement support was implemented.
if_statement
This PR adds support for switch expressions, e.g:
String y; switch (conditionA) { case 1: y = alt0; case 2: y = alt1; break; default: y = alt2; }
String y = switch (conditionA) { case 1 -> alt0; default -> alt1; };
What problem are you trying to solve?
https://github.com/DataDog/datadog-static-analyzer/pull/512 Introduced phi nodes to correctly model the control flow graph for Java. To keep that PR as small as possible, only
if_statement
support was implemented.What is your solution?
This PR adds support for switch expressions, e.g:
Alternatives considered
What the reviewer should know