Commit 185b81e
[clang] Fix crash when passing a braced-init list to a parentehsized aggregate init expression
The previous code incorrectly assumed that we would never call
warnBracedScalarInit(...) with a EK_ParenAggInitMember. This patch fixes
the bug by warning when a scalar member is initialized via a braced-init
list when performing a parentehsized aggregate initialization. This
behavior is consistent with parentehsized list aggregate initialization.
Fixes #63008
Reviewed By: shafik
Differential Revision: https://reviews.llvm.org/D1517631 parent 42f2e6e commit 185b81e
File tree
3 files changed
+10
-1
lines changed- clang
- docs
- lib/Sema
- test/SemaCXX
3 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
724 | 727 | | |
725 | 728 | | |
726 | 729 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1152 | 1152 | | |
1153 | 1153 | | |
1154 | 1154 | | |
| 1155 | + | |
1155 | 1156 | | |
1156 | 1157 | | |
1157 | 1158 | | |
| |||
1186 | 1187 | | |
1187 | 1188 | | |
1188 | 1189 | | |
1189 | | - | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | 1192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
0 commit comments