xref: /llvm-project/clang/test/Headers/crash-instantiated-in-scope-cxx-modules3.cpp (revision 2ccac07bf22d17029d4437b0a727dd55c8c86d56)
1 // RUN: %clang_cc1 %s -std=c++11 -emit-pch -o %t
2 // RUN: %clang_cc1 %s -std=c++11 -include-pch %t -fsyntax-only -verify
3 
4 // expected-no-diagnostics
5 #ifndef HEADER
6 #define HEADER
7 
8 // No crash or assertion failure on multiple nested lambdas deserialization.
9 template <typename T>
10 void b() {
11   [] {
12     []{
13       []{
14         []{
15           []{
16           }();
17         }();
18       }();
19     }();
20   }();
21 }
22 
23 void foo() {
24   b<int>();
25 }
26 #endif
27