MCPcopy Index your code
hub / github.com/LFYSec/MScan / ReachDef

Class ReachDef

src/test/resources/dataflow/ReachDef.java:4–26  ·  view source on GitHub ↗

Test case for reaching definition analysis.

Source from the content-addressed store, hash-verified

2 * Test case for reaching definition analysis.
3 */
4class ReachDef {
5
6 int foo(int a, int b, int c) {
7 int x;
8 if (a > 0) {
9 x = a;
10 } else {
11 x = b;
12 }
13 int y = x;
14 x = c;
15 return x;
16 }
17
18 int loop(int a, int b) {
19 int c;
20 while (a > b) {
21 c = b;
22 --a;
23 }
24 return c;
25 }
26}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected