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