1 #include "helper_decls_test.h" 2 3 namespace { 4 class HelperC1 { 5 public: 6 static int I; 7 }; 8 9 int HelperC1::I = 0; 10 11 class HelperC2 {}; 12 13 class HelperC3 { 14 public: 15 static int I; 16 }; 17 18 int HelperC3::I = 0; 19 HelperFun1()20void HelperFun1() {} 21 HelperFun2()22void HelperFun2() { HelperFun1(); } 23 24 const int K1 = 1; 25 } // namespace 26 27 static const int K2 = 2; HelperFun3()28static void HelperFun3() { K2; } 29 30 namespace a { 31 32 static const int K3 = 3; 33 static const int K4 = HelperC3::I; 34 static const int K5 = 5; 35 static const int K6 = 6; 36 HelperFun4()37static void HelperFun4() {} HelperFun6()38static void HelperFun6() {} 39 f()40void Class1::f() { HelperFun2(); } 41 f()42void Class2::f() { 43 HelperFun1(); 44 HelperFun3(); 45 } 46 f()47void Class3::f() { HelperC1::I; } 48 f()49void Class4::f() { HelperC2 c2; } 50 f()51void Class5::f() { 52 int Result = K1 + K2 + K3; 53 HelperFun4(); 54 } 55 f()56int Class6::f() { 57 int R = K4; 58 return R; 59 } 60 f()61int Class7::f() { 62 int R = K6; 63 return R; 64 } 65 g()66int Class7::g() { 67 HelperFun6(); 68 return 1; 69 } 70 HelperFun5()71static int HelperFun5() { 72 int R = K5; 73 return R; 74 } 75 Fun1()76void Fun1() { HelperFun5(); } 77 78 } // namespace a 79 80 namespace b { 81 namespace { 82 void HelperFun7(); 83 84 class HelperC4; 85 } // namespace 86 Fun3()87void Fun3() { 88 HelperFun7(); 89 HelperC4 *t; 90 } 91 92 namespace { HelperFun7()93void HelperFun7() {} 94 95 class HelperC4 {}; 96 } // namespace 97 } // namespace b 98