Test case for reaching definition analysis.
| 2 | * Test case for reaching definition analysis. |
| 3 | */ |
| 4 | class 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected