1// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-prototypes %s 2 3void f() { } // expected-warning {{no previous prototype for function 'f'}} 4 5namespace NS { 6 void f() { } // expected-warning {{no previous prototype for function 'f'}} 7} 8 9namespace { 10 // Don't warn about functions in anonymous namespaces. 11 void f() { } 12} 13 14struct A { 15 // Don't warn about member functions. 16 void f() { } 17}; 18 19// Don't warn about inline functions. 20inline void g() { } 21 22// Don't warn about function templates. 23template<typename> void h() { } 24 25// Don't warn when instantiating function templates. 26template void h<int>(); 27 28// PR9519: don't warn about friend functions. 29class I { 30 friend void I_friend() {} 31}; 32 33