You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
406 B
26 lines
406 B
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
typedef int f;
|
|
|
|
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);
|
|
}
|
|
};
|
|
}
|