summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/using-decl-1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/using-decl-1.cpp')
-rw-r--r--test/SemaCXX/using-decl-1.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/SemaCXX/using-decl-1.cpp b/test/SemaCXX/using-decl-1.cpp
index 0235624..e8a7d70 100644
--- a/test/SemaCXX/using-decl-1.cpp
+++ b/test/SemaCXX/using-decl-1.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
extern "C" { void f(bool); }
@@ -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