summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/incomplete-decl.c
blob: e342ab8b70cb6c0a8aacd24147ff5ed0913870f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: clang -fsyntax-only -verify %s

void b;  // expected-error {{variable has incomplete type 'void'}}
struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}

static void c; // expected-error {{variable has incomplete type 'void'}}
static struct foo g;  // expected-error {{variable has incomplete type 'struct foo'}}

extern void d;
extern struct foo e;

void func() {
  void b; // expected-error {{variable has incomplete type 'void'}}
  struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}
}
OpenPOWER on IntegriCloud