1 // RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-prototypes -std=c++11 %s
2
f()3 void f() { } // expected-warning {{no previous prototype for function 'f'}}
4
5 namespace NS {
f()6 void f() { } // expected-warning {{no previous prototype for function 'f'}}
7 }
8
9 namespace {
10 // Don't warn about functions in anonymous namespaces.
f()11 void f() { }
12 }
13
14 struct A {
15 // Don't warn about member functions.
fA16 void f() { }
17 };
18
19 // Don't warn about inline functions.
g()20 inline void g() { }
21
22 // Don't warn about function templates.
h()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 {
I_friend()30 friend void I_friend() {}
31 };
32
33 // Don't warn on explicitly deleted functions.
34 void j() = delete;
35