blob: defc851bb4ab3fbde2d8ef26b5ddcf88f9e6ae57 [file] [log] [blame]
Anders Carlsson11582f52009-10-09 23:58:25 +00001// RUN: clang-cc -fsyntax-only -verify %s
2struct A; // expected-note 3 {{forward declaration of 'struct A'}}
3
4A f(); // expected-note {{note: 'f' declared here}}
5
6struct B {
7};
8
9void 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}