opnsense-src/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp

25 lines
379 B
C++
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
2009-06-22 04:08:35 -04:00
typedef int f;
2009-10-14 14:03:49 -04:00
2009-06-22 04:08:35 -04:00
namespace N0 {
struct A {
friend void f();
void g() {
int i = f(1);
}
};
}
namespace N1 {
struct A {
friend void f(A &);
operator int();
void g(A a) {
// ADL should not apply to the lookup of 'f', it refers to the typedef
// above.
int i = f(a);
}
};
}