Debian Codegraph @

clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p6.cpp

raw
1 // RUN: %clang_cc1 -std=c++11 -verify %s
2
3 namespace std_example {
4
5 int p[10];
6 void 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 }