blob: 3ef578d59f6f21ff8342e8e5518b40a06c7f83d7 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Eli Friedman21bab842009-03-22 22:03:03 +00002
3struct foo; // expected-note 3 {{forward declaration of 'struct foo'}}
4
Anders Carlsson8c8d9192009-10-09 23:51:55 +00005struct foo a(); // expected-note {{'a' declared here}}
Eli Friedman21bab842009-03-22 22:03:03 +00006void b(struct foo);
7void c();
8
9void func() {
Anders Carlsson8c8d9192009-10-09 23:51:55 +000010 a(); // expected-error{{calling 'a' with incomplete return type 'struct foo'}}
Eli Friedman21bab842009-03-22 22:03:03 +000011 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}