Method->getResultType().getNonReferenceType(),
RParenLoc));
+ // Check for a valid return type.
+ if (CheckCallReturnType(Method->getResultType(), MemExpr->getMemberLoc(),
+ TheCall.get(), Method))
+ return true;
+
// Convert the object argument (for a non-static member function call).
if (!Method->isStatic() &&
PerformObjectArgumentInitialization(ObjectArg, Method))
// RUN: clang-cc -fsyntax-only -verify %s
-struct A; // expected-note 3 {{forward declaration of 'struct A'}}
+struct A; // expected-note 4 {{forward declaration of 'struct A'}}
A f(); // expected-note {{note: 'f' declared here}}
struct B {
+ A f(); // expected-note {{'f' declared here}}
};
void g() {
Func fp;
fp(); // expected-error {{calling function with incomplete return type 'struct A'}}
((Func)0)(); // expected-error {{calling function with incomplete return type 'struct A'}}
+
+ B b;
+ b.f(); // expected-error {{calling 'f' with incomplete return type 'struct A'}}
}