Commit 994501a
[Clang] Fix evaluation context of lambdas appearing in discarded statements (#146857)
Fixes 2 bugs reported in #146063
- The body of a lambda appearing in a discarded statement was sometimes
considered discarded itself
- A lambda conversion operator that was not odr-used was sometimes not
defined even if it was needed
Fixes #146063
---------
Co-authored-by: Timm Baeder <[email protected]>1 parent d66254e commit 994501a
File tree
3 files changed
+30
-7
lines changed- clang
- lib/Sema
- test/CXX/stmt.stmt/stmt.select/stmt.if
3 files changed
+30
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18252 | 18252 | | |
18253 | 18253 | | |
18254 | 18254 | | |
| 18255 | + | |
| 18256 | + | |
| 18257 | + | |
| 18258 | + | |
| 18259 | + | |
18255 | 18260 | | |
18256 | 18261 | | |
18257 | 18262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15723 | 15723 | | |
15724 | 15724 | | |
15725 | 15725 | | |
15726 | | - | |
15727 | | - | |
15728 | | - | |
15729 | | - | |
15730 | | - | |
15731 | | - | |
15732 | | - | |
| 15726 | + | |
| 15727 | + | |
| 15728 | + | |
15733 | 15729 | | |
15734 | 15730 | | |
15735 | 15731 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
221 | 243 | | |
0 commit comments