When adding the underlying declaration of a decl to a lookup-results
set, expand overloaded function declarations. Long-term, this should
actually be done by the name-lookup code rather than here, but this
part of the code (involving using declarations) is getting a makeover
now and the test-case is useful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88846 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/using-decl-1.cpp b/test/SemaCXX/using-decl-1.cpp
index 37e101e..42deb27 100644
--- a/test/SemaCXX/using-decl-1.cpp
+++ b/test/SemaCXX/using-decl-1.cpp
@@ -17,3 +17,24 @@
void f(int) { } // expected-error{{redefinition}}
}
+
+namespace N {
+ void f(double);
+ void f(long);
+}
+
+struct X0 {
+ void operator()(int);
+ void operator()(long);
+};
+
+struct X1 : X0 {
+ // FIXME: give this operator() a 'float' parameter to test overloading
+ // behavior. It currently fails.
+ void operator()();
+ using X0::operator();
+
+ void test() {
+ (*this)(1);
+ }
+};