xref: /llvm-project/clang/test/AST/nested-array-init-loop-in-lambda-capture.cpp (revision c496aa34c0e82a4322143105fd4410cd05b49921)
1 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -std=c++17 -verify %s
2 // RUN: %clang_cc1 -std=c++17 -verify=ref %s
3 
4 // ref-no-diagnostics
5 // expected-no-diagnostics
6 
used_to_crash()7 void used_to_crash() {
8   int s[2][2];
9 
10   int arr[4];
11 
12   arr[0] = [s] { return s[0][0]; }();
13 }
14