brintos

brintos / llvm-project-archived public Read only

0
0
Text · 377 B · 416aeb4 Raw
15 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -verify %s2 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  // expected-warning {{unknown attribute 'x' ignored}}11  y[[] { return 2; }()] = 2; // expected-error {{consecutive left square brackets}}12}13 14}15