1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 int foo(int); 3 4 namespace N { 5 void f1() { 6 void foo(int); // okay 7 } 8 9 // FIXME: we shouldn't even need this declaration to detect errors 10 // below. 11 void foo(int); // expected-note{{previous declaration is here}} 12 13 void f2() { 14 int foo(int); // expected-error{{functions that differ only in their return type cannot be overloaded}} 15 16 { 17 int foo; 18 { 19 // FIXME: should diagnose this because it's incompatible with 20 // N::foo. However, name lookup isn't properly "skipping" the 21 // "int foo" above. 22 float foo(int); 23 } 24 } 25 } 26 } 27