using declaration, look at its underlying declaration to determine the
lookup result kind (e.g., overloaded, unresolved). Fixes at least one
issue in Boost.Bimap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102317
91177308-0d34-0410-b5e6-
96231b3b80d8
Diag(MemberDecl->getLocation(), diag::note_member_declared_here)
<< MemberName;
+ R.suppressDiagnostics();
return ExprError();
}
// declarations (all methods or method templates) or a single
// method template.
assert((MemE->getNumDecls() > 1) ||
- isa<FunctionTemplateDecl>(*MemE->decls_begin()));
+ isa<FunctionTemplateDecl>(
+ (*MemE->decls_begin())->getUnderlyingDecl()));
(void)MemE;
return BuildCallToMemberFunction(S, Fn, LParenLoc, Args, NumArgs,
// If there's a single decl, we need to examine it to decide what
// kind of lookup this is.
if (N == 1) {
- if (isa<FunctionTemplateDecl>(*Decls.begin()))
+ NamedDecl *D = (*Decls.begin())->getUnderlyingDecl();
+ if (isa<FunctionTemplateDecl>(D))
ResultKind = FoundOverloaded;
- else if (isa<UnresolvedUsingValueDecl>(*Decls.begin()))
+ else if (isa<UnresolvedUsingValueDecl>(D))
ResultKind = FoundUnresolvedValue;
return;
}
}
};
}
+
+namespace test4 {
+ class X {
+ protected:
+ template<typename T> void f(T);
+ };
+
+ class Y : public X {
+ public:
+ using X::f;
+ };
+
+ void test_f(Y y) {
+ y.f(17);
+ }
+}