xref: /aosp_15_r20/external/clang/test/SemaCXX/PR21679.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s
2*67e74705SXin Li 
3*67e74705SXin Li int w = z.;  // expected-error {{use of undeclared identifier 'z'}} \
4*67e74705SXin Li              // expected-error {{expected unqualified-id}}
5*67e74705SXin Li 
6*67e74705SXin Li int x = { y[  // expected-error {{use of undeclared identifier 'y'}} \
7*67e74705SXin Li               // expected-note {{to match this '['}} \
8*67e74705SXin Li               // expected-note {{to match this '{'}} \
9*67e74705SXin Li               // expected-error {{expected ';' after top level declarator}}
10*67e74705SXin Li 
11*67e74705SXin Li // The errors below all occur on the last line of the file, so splitting them
12*67e74705SXin Li // among multiple lines doesn't work.
13*67e74705SXin Li // expected-error {{expected expression}} expected-error {{expected ']'}} expected-error {{expected '}'}}
14