Commit 41006b6
committed
c++: typedef in lambda in pack expansion
In trying to reduce the testcase for PR125408, I came across an older
regression, dating back to r14-9938, though the problem wasn't in that
commit.
cp_walk_subtrees avoids walking into uses of typedefs because it wants to
look at what's actually written. But here we were also skipping over the
definition of the typedef, so extract_locals_r never got to see the use of
't', so later substitution failed.
Fixed by specifically handling typedef DECL_EXPR.
PR c++/125408
gcc/cp/ChangeLog:
* tree.cc (cp_walk_subtrees): Walk into the DECL_ORIGINAL_TYPE of a
typedef DECL_EXPR.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/lambda-targ33.C: New test.1 parent e259a18 commit 41006b6
2 files changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6407 | 6407 | | |
6408 | 6408 | | |
6409 | 6409 | | |
| 6410 | + | |
| 6411 | + | |
| 6412 | + | |
| 6413 | + | |
6410 | 6414 | | |
6411 | 6415 | | |
6412 | 6416 | | |
| |||
| 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 | + | |
| 24 | + | |
0 commit comments