Commit c50ae02
committed
Fix #14371: FP redundantAssignment for nested union members
Reading another member of the same union in a subexpression of the rhs
is a use of the previous value through aliasing, so the assignment is
not redundant. Check the whole rhs expression for the union variable
instead of only the leading member-access chain.1 parent 678290c commit c50ae02
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11063 | 11063 | | |
11064 | 11064 | | |
11065 | 11065 | | |
| 11066 | + | |
| 11067 | + | |
| 11068 | + | |
| 11069 | + | |
| 11070 | + | |
| 11071 | + | |
| 11072 | + | |
| 11073 | + | |
| 11074 | + | |
| 11075 | + | |
| 11076 | + | |
| 11077 | + | |
| 11078 | + | |
| 11079 | + | |
| 11080 | + | |
| 11081 | + | |
| 11082 | + | |
11066 | 11083 | | |
11067 | 11084 | | |
11068 | 11085 | | |
| |||
0 commit comments