Eli Friedman | 21bab84 | 2009-03-22 22:03:03 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
3 | struct foo; // expected-note 3 {{forward declaration of 'struct foo'}} | ||||
4 | |||||
5 | struct foo a(); | ||||
6 | void b(struct foo); | ||||
7 | void c(); | ||||
8 | |||||
9 | void 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 | } |