| 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 |
|
| 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 |
} |