Anders Carlsson | 11582f5 | 2009-10-09 23:58:25 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | struct A; // expected-note 3 {{forward declaration of 'struct A'}} |
| 3 | |
| 4 | A f(); // expected-note {{note: 'f' declared here}} |
| 5 | |
| 6 | struct B { |
| 7 | }; |
| 8 | |
| 9 | void g() { |
| 10 | f(); // expected-error {{calling 'f' with incomplete return type 'struct A'}} |
| 11 | |
| 12 | typedef A (*Func)(); |
| 13 | Func fp; |
| 14 | fp(); // expected-error {{calling function with incomplete return type 'struct A'}} |
| 15 | ((Func)0)(); // expected-error {{calling function with incomplete return type 'struct A'}} |
| 16 | } |