summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/using-decl-1.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2009-12-29 06:17:27 +0000
committerChandler Carruth <chandlerc@gmail.com>2009-12-29 06:17:27 +0000
commitc25c6ee3dbf28ebbe1d918db8a55d498a4266d81 (patch)
tree60baf8bbff749cfa7b0d2bf8b7d8c774bad60b28 /clang/test/SemaCXX/using-decl-1.cpp
parent015215ca86c8a33ce7f887c877da7323001a6691 (diff)
downloadbcm5719-llvm-c25c6ee3dbf28ebbe1d918db8a55d498a4266d81.tar.gz
bcm5719-llvm-c25c6ee3dbf28ebbe1d918db8a55d498a4266d81.zip
Handle using declarations in overloaded and template functions during ADL and
address resolution. This fixes PR5751. Also, while we're here, remove logic from ADL which mistakenly included the definition namespaces of overloaded and/or templated functions whose name or address is used as an argument. llvm-svn: 92245
Diffstat (limited to 'clang/test/SemaCXX/using-decl-1.cpp')
-rw-r--r--clang/test/SemaCXX/using-decl-1.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/using-decl-1.cpp b/clang/test/SemaCXX/using-decl-1.cpp
index fe4d167fe27..e8a7d70976e 100644
--- a/clang/test/SemaCXX/using-decl-1.cpp
+++ b/clang/test/SemaCXX/using-decl-1.cpp
@@ -42,3 +42,21 @@ struct X1 : X0 {
struct A { void f(); };
struct B : A { };
class C : B { using B::f; };
+
+// PR5751: Resolve overloaded functions through using decls.
+namespace O {
+ void f(int i);
+ void f(double d);
+}
+namespace P {
+ void f();
+ void g(void (*ptr)(int));
+ using O::f;
+ void test() {
+ f();
+ f(1);
+ void (*f_ptr1)(double) = f;
+ void (*f_ptr2)() = f;
+ g(f);
+ }
+}
OpenPOWER on IntegriCloud