Commit 9ea993f
authored
[Clang] Recover GLTemplateParameterList for generic lambdas in RebuildLambdaScopeInfo (#118176)
The NTTP argument appearing inside a trailing return type of a generic
lambda would have us check for potential lambda captures, where the
function needs GLTemplateParameterList of the current LSI to tell
whether the lambda is generic.
The lambda scope in this context is rebuilt by the
LambdaScopeForCallOperatorInstantiationRAII when substituting the lambda
operator during template argument deduction. Thus, I think the template
parameter list should be preserved in the rebuilding process, as it
seems otherwise innocuous to me.
Fixes #1159311 parent fb14012 commit 9ea993f
File tree
3 files changed
+36
-3
lines changed- clang
- docs
- lib/Sema
- test/SemaCXX
3 files changed
+36
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
| 767 | + | |
| 768 | + | |
767 | 769 | | |
768 | 770 | | |
769 | 771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15519 | 15519 | | |
15520 | 15520 | | |
15521 | 15521 | | |
15522 | | - | |
15523 | | - | |
| 15522 | + | |
| 15523 | + | |
15524 | 15524 | | |
15525 | | - | |
| 15525 | + | |
| 15526 | + | |
| 15527 | + | |
| 15528 | + | |
| 15529 | + | |
| 15530 | + | |
| 15531 | + | |
| 15532 | + | |
| 15533 | + | |
| 15534 | + | |
| 15535 | + | |
| 15536 | + | |
| 15537 | + | |
| 15538 | + | |
| 15539 | + | |
| 15540 | + | |
15526 | 15541 | | |
15527 | 15542 | | |
15528 | 15543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
301 | 317 | | |
302 | 318 | | |
303 | 319 | | |
| |||
0 commit comments