Clang Project

clang_source_code/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2// expected-no-diagnostics
3
4typedef int f; 
5
6namespace N0 {
7  struct A { 
8    friend void f(); 
9    void g() {
10      int i = f(1);
11    }
12  };
13}
14
15namespace N1 {
16  struct A { 
17    friend void f(A &);
18    operator int();
19    void g(A a) {
20      // ADL should not apply to the lookup of 'f', it refers to the typedef
21      // above.
22      int i = f(a);
23    }
24  };
25}
26