2 | | do_something (int flag) |
| | ^~~~~~~~~~~~ |
| | | |
| | (4) entry to ‘do_something’
|
3 | | { |
4 | | if (flag) |
| | ~~ |
| | | |
| | (5) following ‘true’ branch (when ‘flag != 0’)...
─>─┐ |
| | │ |
| | │ |
| ┌ | ───────────────────────────────────────────────────────┘ |
5 | │ | throw 42; // { dg-warning "leak of 'ptr'" } |
| │ | ~~ |
| │ | | |
| └ | ─────────>(6) ...to here
|
| | (7) throwing exception of type ‘int’ here... |
| | (8) ⚠️ ‘ptr’ leaks here; was allocated at (2)
|