Commit fdc7691
Fix #15062 Wrong varid for shadowed member in initializer list after braced init list argument (FP uninitMemberVar, selfInitialization, functionStatic)
In setVarIdPass1 a '{' inside a constructor initializer list was only
recognized as part of an argument if it was preceded by a name, '>',
'>>' or '('. A braced init list that is not the first argument, e.g.
x(f(0, {0})), or a nested one, e.g. x(f(0, {{1}, 2})), was treated as
the start of the constructor body. As a result the parameter scope was
not left correctly, so the member in a following p(p) got the varid of
the parameter, and the parameter varid leaked into later functions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 8bb772d commit fdc7691
2 files changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4835 | 4835 | | |
4836 | 4836 | | |
4837 | 4837 | | |
4838 | | - | |
| 4838 | + | |
4839 | 4839 | | |
4840 | 4840 | | |
4841 | 4841 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2715 | 2715 | | |
2716 | 2716 | | |
2717 | 2717 | | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
2718 | 2742 | | |
2719 | 2743 | | |
2720 | 2744 | | |
| |||
0 commit comments