Commit c896266
committed
[clang][Sema] Fix crash on designated initializer of union member in subobject
Fixes #166327
Clang previously hit an assertion in C++ mode when a nested
initializer list was followed by a designated initializer that
referred to a union member of the same subobject.
The assertions failing this were logically sound, and this change
ensures that such initializations are handled correctly during
semantic analysis to avoid failing any assertion.1 parent 5896a25 commit c896266
File tree
2 files changed
+27
-1
lines changed- clang
- lib/Sema
- test/SemaCXX
2 files changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2402 | 2402 | | |
2403 | 2403 | | |
2404 | 2404 | | |
2405 | | - | |
| 2405 | + | |
2406 | 2406 | | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
2407 | 2410 | | |
2408 | 2411 | | |
2409 | 2412 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments