Jan Korous | 5e8b4be | 2020-07-16 12:06:02 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s |
Jan Korous | e81f9cd | 2020-07-09 12:06:01 -0700 | [diff] [blame] | 2 | |
| 3 | struct Bar {int a;}; |
| 4 | const Bar arr[2] = {{1}}; |
| 5 | |
| 6 | struct Foo {}; |
| 7 | |
| 8 | const int b = 2; |
| 9 | |
| 10 | void foo(int a) { |
| 11 | Foo *foo_array; |
| 12 | foo_array = new Foo[arr[0].a]; |
| 13 | } |
Jan Korous | 5e8b4be | 2020-07-16 12:06:02 -0700 | [diff] [blame] | 14 | |
| 15 | void Test(int N) { |
| 16 | int arr[N]; |
| 17 | decltype([&arr]{}) *p; // expected-error {{lambda expression in an unevaluated operand}} |
| 18 | } |