1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // rdar://problem/8540720
16 friend void bar(); // expected-error {{no matching function found in local scope}}
22 void bar(); // expected-note {{'::test2::bar' declared here}}
24 void foo() { // expected-note {{'::test2::foo' declared here}}
26 friend void foo(); // expected-error {{no matching function 'foo' found in local scope; did you mean '::test2::foo'?}}
29 void foo(); // expected-note {{local declaration nearly matches}}
36 friend void foo(); // expected-error {{no matching function found in local scope}}
43 friend void foo(); // expected-error {{no matching function found in local scope}}
48 friend void bar(); // expected-error {{no matching function 'bar' found in local scope; did you mean '::test2::bar'?}}
53 friend void bar(); // expected-error {{no matching function found in local scope}}
64 void bar() { Inner::f(); }
71 void bar(); // expected-note {{'bar' declared here}}
80 friend void baz(); // expected-error {{no matching function 'baz' found in local scope; did you mean 'bar'?}}
88 friend void bar(); // expected-error {{no matching function found in local scope}}
89 friend void quux(); // expected-error {{no matching function found in local scope}}