OverloadCandidateSet CandidateSet;
const RecordType *BaseRecord = Base->getType()->getAs<RecordType>();
+ if (RequireCompleteType(Base->getLocStart(), Base->getType(),
+ PDiag(diag::err_typecheck_incomplete_tag)
+ << Base->getSourceRange()))
+ return ExprError();
+
LookupResult R(*this, OpName, OpLoc, LookupOrdinaryName);
LookupQualifiedName(R, BaseRecord->getDecl());
R.suppressDiagnostics();
struct D : A { };
-void f(C &c, D& d) {
+struct E; // expected-note {{forward declaration of 'struct E'}}
+
+void f(C &c, D& d, E& e) {
c->f(); // expected-error{{use of overloaded operator '->' is ambiguous}}
d->f();
+ e->f(); // expected-error{{incomplete definition of type}}
}