nested_lambda_overflow.cpp
2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// RUN: %clang %s -fsyntax-only -fbracket-depth=512
// RUN: not %clang %s -fsyntax-only -fbracket-depth=512 -DFAIL 2>&1 | FileCheck %s
template <class T> int foo(T &&t);
void bar(int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
[](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo([](int x = foo(
#ifdef FAIL
[](int x = foo(
#endif
[](int x = foo(1)){}
#ifdef FAIL
)){}
#endif
)){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
)){})){})){})){})){})){})){})){}
));
// CHECK: fatal error: function scope depth exceeded maximum of 127