Douglas Gregor | f25760e | 2011-04-12 01:02:45 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Douglas Gregor | f25760e | 2011-04-12 01:02:45 +0000 | [diff] [blame] | 3 | |
| 4 | // <rdar://problem/9142559>: For the purposes of Argument-Dependent |
| 5 | // Lookup, Objective-C classes are considered to be in the global |
| 6 | // namespace. |
| 7 | |
| 8 | @interface NSFoo |
| 9 | @end |
| 10 | |
| 11 | template<typename T> |
| 12 | void f(T t) { |
| 13 | g(t); |
| 14 | } |
| 15 | |
| 16 | void g(NSFoo*); |
| 17 | |
| 18 | void test(NSFoo *foo) { |
| 19 | f(foo); |
| 20 | } |