From 91f61fc921e4abcaeb4a85b4e52f1db0cbdf2468 Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 26 Jan 2010 06:04:06 +0000 Subject: Allow ADL to find functions imported by using decls. Leave wordy comment about interaction between ADL and default arguments. Shrug shoulders, commit. llvm-svn: 94524 --- clang/test/SemaCXX/using-decl-1.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'clang/test/SemaCXX/using-decl-1.cpp') diff --git a/clang/test/SemaCXX/using-decl-1.cpp b/clang/test/SemaCXX/using-decl-1.cpp index e8a7d70976e..eb41e6630fe 100644 --- a/clang/test/SemaCXX/using-decl-1.cpp +++ b/clang/test/SemaCXX/using-decl-1.cpp @@ -60,3 +60,20 @@ namespace P { g(f); } } + +// Make sure that ADL can find names brought in by using decls. +namespace test0 { + namespace ns { + class Foo {}; + + namespace inner { + void foo(char *); // expected-note {{no known conversion}} + } + + using inner::foo; + } + + void test(ns::Foo *p) { + foo(*p); // expected-error {{no matching function for call to 'foo'}} + } +} -- cgit v1.2.3