gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C
raw| 1 | // PR c++/59791 |
| 2 | // We force the gimple dump to trigger use of lang_decl_name. |
| 3 | // { dg-do compile { target c++11 } } |
| 4 | // { dg-options "-fdump-tree-gimple" } |
| 5 | |
| 6 | template < class T > void |
| 7 | f (T t) |
| 8 | { |
| 9 | int i = t; |
| 10 | [](int)->decltype (i + t) |
| 11 | { |
| 12 | return 0; |
| 13 | } |
| 14 | (0); |
| 15 | } |
| 16 | |
| 17 | void |
| 18 | foo () |
| 19 | { |
| 20 | f (0); |
| 21 | } |