incomplete-call.c revision 21bab842fb9e25fa8be50ae065090fef514fefed
1// RUN: clang -fsyntax-only -verify %s
2
3struct foo; // expected-note 3 {{forward declaration of 'struct foo'}}
4
5struct foo a();
6void b(struct foo);
7void c();
8
9void func() {
10  a(); // expected-error{{return type of called function ('struct foo') is incomplete}}
11  b(*(struct foo*)0); // expected-error{{argument type 'struct foo' is incomplete}}
12  c(*(struct foo*)0); // expected-error{{argument type 'struct foo' is incomplete}}
13}
14