Commit bcab8ac
[clang] return type not correctly deduced for discarded lambdas (#153921)
The early return for lamda expressions with deduced return types in
Sema::ActOnCapScopeReturnStmt meant that we were not actually perform
the required return type deduction for such lambdas when in a discarded
context.
This PR removes that early return allowing the existing return type
deduction steps to be performed.
Fixes #153884
Fix developed by, and
Co-authored-by: Corentin Jabot <[email protected]>1 parent 16aa283 commit bcab8ac
File tree
2 files changed
+17
-1
lines changed- clang
- lib/Sema
- test/CXX/stmt.stmt/stmt.select/stmt.if
2 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5669 | 5669 | | |
5670 | 5670 | | |
5671 | 5671 | | |
5672 | | - | |
| 5672 | + | |
5673 | 5673 | | |
5674 | 5674 | | |
5675 | 5675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
242 | 258 | | |
243 | 259 | | |
0 commit comments