2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-03-23 06:03:03 +08:00
|
|
|
|
|
|
|
struct foo; // expected-note 3 {{forward declaration of 'struct foo'}}
|
|
|
|
|
2009-10-10 07:51:55 +08:00
|
|
|
struct foo a(); // expected-note {{'a' declared here}}
|
2009-03-23 06:03:03 +08:00
|
|
|
void b(struct foo);
|
|
|
|
void c();
|
|
|
|
|
|
|
|
void func() {
|
2009-10-10 07:51:55 +08:00
|
|
|
a(); // expected-error{{calling 'a' with incomplete return type 'struct foo'}}
|
2009-03-23 06:03:03 +08:00
|
|
|
b(*(struct foo*)0); // expected-error{{argument type 'struct foo' is incomplete}}
|
|
|
|
c(*(struct foo*)0); // expected-error{{argument type 'struct foo' is incomplete}}
|
|
|
|
}
|