clang/test/SemaObjCXX/argument-dependent-lookup.mm
raw| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | // For the purposes of Argument-Dependent Lookup, Objective-C classes are |
| 5 | // considered to be in the global namespace. |
| 6 | |
| 7 | @interface NSFoo |
| 8 | @end |
| 9 | |
| 10 | template<typename T> |
| 11 | void f(T t) { |
| 12 | g(t); |
| 13 | } |
| 14 | |
| 15 | void g(NSFoo*); |
| 16 | |
| 17 | void test(NSFoo *foo) { |
| 18 | f(foo); |
| 19 | } |