@@ -13,59 +13,59 @@ void func_template() {}
1313// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function 'func_template'
1414// CHECK-FIXES: static void func_template() {}
1515
16- void func_cpp_inc ();
16+ void func_cpp_inc () {}
1717// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function 'func_cpp_inc'
18- // CHECK-FIXES: static void func_cpp_inc();
18+ // CHECK-FIXES: static void func_cpp_inc() {}
1919
20- int * func_cpp_inc_return_ptr ();
20+ int * func_cpp_inc_return_ptr () {}
2121// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function 'func_cpp_inc_return_ptr'
22- // CHECK-FIXES: static int* func_cpp_inc_return_ptr();
22+ // CHECK-FIXES: static int* func_cpp_inc_return_ptr() {}
2323
24- const int * func_cpp_inc_return_const_ptr ();
24+ const int * func_cpp_inc_return_const_ptr () {}
2525// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: function 'func_cpp_inc_return_const_ptr'
26- // CHECK-FIXES: static const int* func_cpp_inc_return_const_ptr();
26+ // CHECK-FIXES: static const int* func_cpp_inc_return_const_ptr() {}
2727
28- int const * func_cpp_inc_return_ptr_const ();
28+ int const * func_cpp_inc_return_ptr_const () {}
2929// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: function 'func_cpp_inc_return_ptr_const'
30- // CHECK-FIXES: static int const* func_cpp_inc_return_ptr_const();
30+ // CHECK-FIXES: static int const* func_cpp_inc_return_ptr_const() {}
3131
32- int * const func_cpp_inc_return_const ();
32+ int * const func_cpp_inc_return_const () {}
3333// CHECK-MESSAGES: :[[@LINE-1]]:13: warning: function 'func_cpp_inc_return_const'
34- // CHECK-FIXES: static int * const func_cpp_inc_return_const();
34+ // CHECK-FIXES: static int * const func_cpp_inc_return_const() {}
3535
36- volatile const int * func_cpp_inc_return_volatile_const_ptr ();
36+ volatile const int * func_cpp_inc_return_volatile_const_ptr () {}
3737// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: function 'func_cpp_inc_return_volatile_const_ptr'
38- // CHECK-FIXES: static volatile const int* func_cpp_inc_return_volatile_const_ptr();
38+ // CHECK-FIXES: static volatile const int* func_cpp_inc_return_volatile_const_ptr() {}
3939
40- [[nodiscard]] void func_nodiscard ();
40+ [[nodiscard]] void func_nodiscard () {}
4141// CHECK-MESSAGES: :[[@LINE-1]]:20: warning: function 'func_nodiscard'
42- // CHECK-FIXES: {{\[\[nodiscard\]\]}} static void func_nodiscard();
42+ // CHECK-FIXES: {{\[\[nodiscard\]\]}} static void func_nodiscard() {}
4343
4444#define NDS [[nodiscard]]
4545#define NNDS
4646
47- NDS void func_nds ();
47+ NDS void func_nds () {}
4848// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: function 'func_nds'
49- // CHECK-FIXES: NDS static void func_nds();
49+ // CHECK-FIXES: NDS static void func_nds() {}
5050
51- NNDS void func_nnds ();
51+ NNDS void func_nnds () {}
5252// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: function 'func_nnds'
53- // CHECK-FIXES: NNDS static void func_nnds();
53+ // CHECK-FIXES: NNDS static void func_nnds() {}
5454
5555#include " func_cpp.inc"
5656
57- void func_h_inc ();
57+ void func_h_inc () {}
5858
5959struct S {
6060 void method ();
6161};
6262void S::method () {}
6363
64- void func_header ();
65- extern void func_extern ();
66- static void func_static ();
64+ void func_header () {}
65+ extern void func_extern () {}
66+ static void func_static () {}
6767namespace {
68- void func_anonymous_ns ();
68+ void func_anonymous_ns () {}
6969} // namespace
7070
7171int main (int argc, const char *argv[]) {}
@@ -75,3 +75,13 @@ void func_extern_c_1() {}
7575}
7676
7777extern " C" void func_extern_c_2 () {}
78+
79+ namespace gh117488 {
80+ void func_with_body ();
81+ // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function 'func_with_body'
82+ // CHECK-FIXES: static void func_with_body();
83+ void func_with_body () {}
84+
85+ void func_without_body ();
86+ void func_without_body ();
87+ }
0 commit comments