summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/using-decl-templates.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-04 08:48:52 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-04 08:48:52 +0000
commit4b52007c35d28d321e1e1b1d6df09d9df5558788 (patch)
treeaec36e12d8be72df1a42ea946f5cf6e3a7ceb5e8 /clang/test/SemaCXX/using-decl-templates.cpp
parentba37e1eb49c41689bbf0478fb44e66183203dd13 (diff)
downloadbcm5719-llvm-4b52007c35d28d321e1e1b1d6df09d9df5558788.tar.gz
bcm5719-llvm-4b52007c35d28d321e1e1b1d6df09d9df5558788.zip
Don't be so eager to replace UsingDecls in a DeclContext's lookup table;
check that the TargetNestedNameDecl is the same first. llvm-svn: 118239
Diffstat (limited to 'clang/test/SemaCXX/using-decl-templates.cpp')
-rw-r--r--clang/test/SemaCXX/using-decl-templates.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/using-decl-templates.cpp b/clang/test/SemaCXX/using-decl-templates.cpp
index 5148ed5bcc7..7b4da9d50d0 100644
--- a/clang/test/SemaCXX/using-decl-templates.cpp
+++ b/clang/test/SemaCXX/using-decl-templates.cpp
@@ -45,3 +45,21 @@ namespace test0 {
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();
+}
OpenPOWER on IntegriCloud