check that the TargetNestedNameDecl is the same first.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118239
91177308-0d34-0410-b5e6-
96231b3b80d8
return cast<UsingShadowDecl>(this)->getTargetDecl() ==
cast<UsingShadowDecl>(OldD)->getTargetDecl();
+ if (isa<UsingDecl>(this) && isa<UsingDecl>(OldD))
+ return cast<UsingDecl>(this)->getTargetNestedNameDecl() ==
+ cast<UsingDecl>(OldD)->getTargetNestedNameDecl();
+
// For non-function declarations, if the declarations are of the
// same kind then this must be a redeclaration, or semantic analysis
// would not have given us the new declaration.
template struct E<int>;
}
+
+// PR7896
+namespace PR7896 {
+template <class T> struct Foo {
+ int k (float);
+};
+struct Baz {
+ int k (int);
+};
+template <class T> struct Bar : public Foo<T>, Baz {
+ using Foo<T>::k;
+ using Baz::k;
+ int foo() {
+ return k (1.0f);
+ }
+};
+template int Bar<int>::foo();
+}