p6.cpp revision 6ee326af4e77e6f05973486097884d7431f2108d
1// RUN: %clang_cc1 -std=c++11 -verify %s 2 3namespace std_example { 4 5int p[10]; 6void f() { 7 int x = 42, y[5]; 8 // FIXME: Produce a better diagnostic for this case. 9 int(p[[x] { return x; }()]); // expected-error {{expected ']'}} 10 y[[] { return 2; }()] = 2; // expected-error {{consecutive left square brackets}} 11} 12 13} 14