diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 7ef3348bdc..c208ed2fca 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -4574,9 +4574,6 @@ Sema::ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, return MaybeBindToTemporary(TheCall); } - return ExprError(Diag(Fn->getLocStart(), - diag::err_typecheck_call_not_function) - << Fn->getType() << Fn->getSourceRange()); } } } diff --git a/test/SemaCXX/member-pointers-2.cpp b/test/SemaCXX/member-pointers-2.cpp index 4b3b82c029..6c39282e5a 100644 --- a/test/SemaCXX/member-pointers-2.cpp +++ b/test/SemaCXX/member-pointers-2.cpp @@ -34,3 +34,18 @@ void test0() { Test0 mytest; mytest.test(); } + +namespace rdar9065289 { + typedef void (*FuncPtr)(); + struct X0 { }; + + struct X1 + { + X0* x0; + FuncPtr X0::*fptr; + }; + + void f(X1 p) { + (p.x0->*(p.fptr))(); + } +}