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