Commit 9d1dd9a
authored
[Sema] Fix false positive warnings for misaligned member access (llvm#150025)
These warnings are reported on a per expression basis, however some
potential misaligned accesses are discarded before that happens. The
problem is when a new expression starts while processing another
expression. The new expression will end first and emit all potential
misaligned accesses collected up to that point. That includes candidates
that were found in the parent expression, even though they might have
gotten discarded later.
Fixed by checking if the candidate is located withing the currently
processed expression.
Fixes llvm#1447291 parent 2211394 commit 9d1dd9a
File tree
5 files changed
+30
-13
lines changed- clang
- docs
- include/clang/Sema
- lib/Sema
- test/Sema
5 files changed
+30
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2659 | 2659 | | |
2660 | 2660 | | |
2661 | 2661 | | |
2662 | | - | |
2663 | | - | |
2664 | | - | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
2665 | 2665 | | |
2666 | 2666 | | |
2667 | 2667 | | |
| |||
3117 | 3117 | | |
3118 | 3118 | | |
3119 | 3119 | | |
3120 | | - | |
3121 | | - | |
3122 | | - | |
3123 | 3120 | | |
3124 | 3121 | | |
3125 | 3122 | | |
| |||
6765 | 6762 | | |
6766 | 6763 | | |
6767 | 6764 | | |
| 6765 | + | |
| 6766 | + | |
| 6767 | + | |
| 6768 | + | |
6768 | 6769 | | |
6769 | 6770 | | |
6770 | 6771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14125 | 14125 | | |
14126 | 14126 | | |
14127 | 14127 | | |
14128 | | - | |
14129 | 14128 | | |
14130 | 14129 | | |
14131 | 14130 | | |
| |||
15570 | 15569 | | |
15571 | 15570 | | |
15572 | 15571 | | |
15573 | | - | |
| 15572 | + | |
| 15573 | + | |
15574 | 15574 | | |
15575 | 15575 | | |
15576 | 15576 | | |
15577 | | - | |
| 15577 | + | |
15578 | 15578 | | |
15579 | 15579 | | |
15580 | 15580 | | |
| |||
15583 | 15583 | | |
15584 | 15584 | | |
15585 | 15585 | | |
15586 | | - | |
| 15586 | + | |
15587 | 15587 | | |
15588 | 15588 | | |
15589 | 15589 | | |
| |||
15594 | 15594 | | |
15595 | 15595 | | |
15596 | 15596 | | |
15597 | | - | |
15598 | | - | |
| 15597 | + | |
| 15598 | + | |
| 15599 | + | |
| 15600 | + | |
15599 | 15601 | | |
15600 | 15602 | | |
15601 | 15603 | | |
15602 | 15604 | | |
15603 | | - | |
| 15605 | + | |
15604 | 15606 | | |
15605 | 15607 | | |
15606 | 15608 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18121 | 18121 | | |
18122 | 18122 | | |
18123 | 18123 | | |
| 18124 | + | |
| 18125 | + | |
18124 | 18126 | | |
18125 | 18127 | | |
18126 | 18128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
0 commit comments