c++: variadic lambda noexcept-specifier [PR99583]
The tree-walk looking for parameter packs didn't find this one because we weren't stepping into TYPE_RAISES_EXCEPTIONS. gcc/cp/ChangeLog: PR c++/99583 PR c++/99584 * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into TYPE_RAISES_EXCEPTIONS. gcc/testsuite/ChangeLog: PR c++/99583 * g++.dg/cpp0x/lambda/lambda-variadic12.C: New test.
This commit is contained in:
parent
af78514a18
commit
0cf4813202
@ -5415,6 +5415,11 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func,
|
||||
}
|
||||
break;
|
||||
|
||||
case FUNCTION_TYPE:
|
||||
case METHOD_TYPE:
|
||||
WALK_SUBTREE (TYPE_RAISES_EXCEPTIONS (*tp));
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
9
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic12.C
Normal file
9
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic12.C
Normal file
@ -0,0 +1,9 @@
|
||||
// PR c++/99583
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
void f(...);
|
||||
|
||||
template <bool... B>
|
||||
void g() {
|
||||
f([]() noexcept(B) {} ...);
|
||||
}
|
Loading…
Reference in New Issue
Block a user