Commit 4c601da
committed
Move visited_cases in class scope
Rename visited_cases to visited_switch_cases_ and move it in class
scope. VisitSwitchStmt always resets the set of visited switch cases.
The old implementation was buggy because it saved reused SwitchCase
pointers across translation units, making contain() return true for
switches declared in other TUs.1 parent ff93441 commit 4c601da
2 files changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2579 | 2579 | | |
2580 | 2580 | | |
2581 | 2581 | | |
2582 | | - | |
2583 | | - | |
2584 | 2582 | | |
2585 | | - | |
| 2583 | + | |
2586 | 2584 | | |
2587 | 2585 | | |
2588 | | - | |
| 2586 | + | |
2589 | 2587 | | |
2590 | 2588 | | |
2591 | 2589 | | |
| |||
2615 | 2613 | | |
2616 | 2614 | | |
2617 | 2615 | | |
| 2616 | + | |
| 2617 | + | |
2618 | 2618 | | |
2619 | 2619 | | |
2620 | 2620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
465 | 466 | | |
466 | 467 | | |
467 | 468 | | |
| |||
0 commit comments