1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s 2*67e74705SXin Li 3*67e74705SXin Li struct foo; // expected-note 3 {{forward declaration of 'struct foo'}} 4*67e74705SXin Li 5*67e74705SXin Li struct foo a(); // expected-note {{'a' declared here}} 6*67e74705SXin Li void b(struct foo); 7*67e74705SXin Li void c(); 8*67e74705SXin Li func(void * p)9*67e74705SXin Livoid func(void *p) { 10*67e74705SXin Li a(); // expected-error{{calling 'a' with incomplete return type 'struct foo'}} 11*67e74705SXin Li b(*(struct foo*)p); // expected-error{{argument type 'struct foo' is incomplete}} 12*67e74705SXin Li c(*(struct foo*)p); // expected-error{{argument type 'struct foo' is incomplete}} 13*67e74705SXin Li } 14