[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / array-bound-merge.cpp
blob02d1916f6ee7f53471c45ae4a178b98ce62c8749
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // PR5515
4 extern int a[];
5 int a[10];
6 extern int b[10];
7 int b[];
8 extern int c[1];
9 int c[] = {1,2}; // expected-error {{excess elements in array initializer}}
11 int d[1][]; // expected-error {{array has incomplete element type 'int[]'}}
13 extern const int e[2]; // expected-note {{previous declaration is here}}
14 int e[] = { 1 }; // expected-error {{redefinition of 'e' with a different type: 'int[]' vs 'const int[2]'}}