Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
Eli Friedman | 21bab84 | 2009-03-22 22:03:03 +0000 | [diff] [blame] | 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 | } |