Files
codeql/cpp/ql/test/library-tests/switch_cfg/cfg.expected
Jeroen Ketema 5b0603a5b9 C++: Artificial block insertion for loops and switches has changed in frontend
There are now more artificial blocks containing more than one instruction
(artificial blocks containing a single instruction have the extractor only
emit that instruction and not the block). The second instruction in each case
is the label for breaking out of a loop or switch.
2022-04-25 21:13:52 +02:00

90 lines
3.0 KiB
Plaintext

| 10 | 1 | { ... } | 12 { ... } |
| 10 | 44 | f | <no successors> |
| 12 | 2 | { ... } | 12 switch (...) ... |
| 12 | 3 | switch (...) ... | 12 cond |
| 12 | 4 | cond | 12 { ... } |
| 12 | 5 | { ... } | 13 case ...: |
| 12 | 5 | { ... } | 16 case ...: |
| 12 | 5 | { ... } | 18 case ...: |
| 12 | 5 | { ... } | 21 case ...: |
| 12 | 5 | { ... } | 22 case ...: |
| 12 | 5 | { ... } | 24 case ...: |
| 12 | 5 | { ... } | 25 default: |
| 12 | 5 | { ... } | 26 case ...: |
| 12 | 5 | { ... } | 28 case ...: |
| 13 | 1 | 1 | <no successors> |
| 13 | 6 | case ...: | 14 ExprStmt |
| 14 | 7 | ExprStmt | 14 111 |
| 14 | 8 | 111 | 14 x |
| 14 | 9 | x | 14 ... = ... |
| 14 | 10 | ... = ... | 15 break; |
| 15 | 11 | break; | 31 label ...: |
| 16 | 1 | 1 | <no successors> |
| 16 | 1 | 2 | <no successors> |
| 16 | 1 | ... + ... | <no successors> |
| 16 | 6 | case ...: | 17 ExprStmt |
| 17 | 7 | ExprStmt | 17 333 |
| 17 | 8 | 333 | 17 x |
| 17 | 9 | x | 17 ... = ... |
| 17 | 10 | ... = ... | 18 case ...: |
| 18 | 1 | 4 | <no successors> |
| 18 | 11 | case ...: | 19 ExprStmt |
| 19 | 12 | ExprStmt | 19 444 |
| 19 | 13 | 444 | 19 x |
| 19 | 14 | x | 19 ... = ... |
| 19 | 15 | ... = ... | 20 break; |
| 20 | 16 | break; | 31 label ...: |
| 21 | 1 | 5 | <no successors> |
| 21 | 6 | case ...: | 22 case ...: |
| 22 | 1 | 6 | <no successors> |
| 22 | 7 | case ...: | 23 ExprStmt |
| 23 | 8 | ExprStmt | 23 777 |
| 23 | 9 | 777 | 23 x |
| 23 | 10 | x | 23 ... = ... |
| 23 | 11 | ... = ... | 24 case ...: |
| 24 | 1 | 7 | <no successors> |
| 24 | 12 | case ...: | 25 default: |
| 25 | 13 | default: | 26 case ...: |
| 26 | 1 | 8 | <no successors> |
| 26 | 14 | case ...: | 27 ExprStmt |
| 27 | 15 | ExprStmt | 27 888 |
| 27 | 16 | 888 | 27 x |
| 27 | 17 | x | 27 ... = ... |
| 27 | 18 | ... = ... | 28 case ...: |
| 28 | 1 | 9 | <no successors> |
| 28 | 19 | case ...: | 29 ExprStmt |
| 29 | 20 | ExprStmt | 29 999 |
| 29 | 21 | 999 | 29 x |
| 29 | 22 | x | 29 ... = ... |
| 29 | 23 | ... = ... | 30 break; |
| 30 | 24 | break; | 31 label ...: |
| 31 | 42 | label ...: | 33 return ... |
| 33 | 43 | return ... | 10 f |
| 36 | 1 | { ... } | 38 { ... } |
| 36 | 23 | g | <no successors> |
| 38 | 2 | { ... } | 38 switch (...) ... |
| 38 | 3 | switch (...) ... | 38 cond |
| 38 | 4 | cond | 38 { ... } |
| 38 | 5 | { ... } | 39 case ...: |
| 38 | 5 | { ... } | 42 case ...: |
| 38 | 5 | { ... } | 45 label ...: |
| 39 | 1 | 1 | <no successors> |
| 39 | 6 | case ...: | 40 ExprStmt |
| 40 | 7 | ExprStmt | 40 111 |
| 40 | 8 | 111 | 40 x |
| 40 | 9 | x | 40 ... = ... |
| 40 | 10 | ... = ... | 41 break; |
| 41 | 11 | break; | 45 label ...: |
| 42 | 1 | 2 | <no successors> |
| 42 | 6 | case ...: | 43 ExprStmt |
| 43 | 7 | ExprStmt | 43 222 |
| 43 | 8 | 222 | 43 x |
| 43 | 9 | x | 43 ... = ... |
| 43 | 10 | ... = ... | 45 label ...: |
| 45 | 17 | label ...: | 46 ExprStmt |
| 46 | 18 | ExprStmt | 46 999 |
| 46 | 19 | 999 | 46 x |
| 46 | 20 | x | 46 ... = ... |
| 46 | 21 | ... = ... | 48 return ... |
| 48 | 22 | return ... | 36 g |