diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-15 08:11:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-15 08:11:13 +0000 |
commit | 54fdb417fec84efdb1f0fe18dff21c48f4da54b8 (patch) | |
tree | c5280b29a3d4c06fea0e72e5112446f50107d34a /clang/test/SemaCXX/using-decl-1.cpp | |
parent | 5ad7e15698193e92b15e9834f332d87b6b750188 (diff) | |
download | bcm5719-llvm-54fdb417fec84efdb1f0fe18dff21c48f4da54b8.tar.gz bcm5719-llvm-54fdb417fec84efdb1f0fe18dff21c48f4da54b8.zip |
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.
llvm-svn: 88846
Diffstat (limited to 'clang/test/SemaCXX/using-decl-1.cpp')
-rw-r--r-- | clang/test/SemaCXX/using-decl-1.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/using-decl-1.cpp b/clang/test/SemaCXX/using-decl-1.cpp index 37e101e221e..42deb27027b 100644 --- a/clang/test/SemaCXX/using-decl-1.cpp +++ b/clang/test/SemaCXX/using-decl-1.cpp @@ -17,3 +17,24 @@ namespace N { 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); + } +}; |