1 // RUN: %clang_cc1 %s -emit-llvm-only -verify 2 // expected-no-diagnostics 3 // PR5489 4 5 template<typename E> 6 struct Bar { 7 int x_; 8 }; 9 10 static struct Bar<int> bar[1] = { 11 { 0 } 12 }; 13 14 15 16 namespace incomplete_type_refs { 17 struct A; 18 extern A g[]; 19 void foo(A*); 20 void f(void) { 21 foo(g); // Reference to array with unknown element type. 22 } 23 24 struct A { // define the element type. 25 int a,b,c; 26 }; 27 28 A *f2() { 29 return &g[1]; 30 } 31 32 } 33 34 namespace PR10395 { 35 struct T; 36 extern T x[]; 37 T* f() { return x; } 38 } 39 40 namespace PR10384 { 41 struct X; 42 extern X x[1]; 43 X* f() { return x; } 44 } 45