| 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 |
|
| 20 |
void HelperFun1() {} |
| 21 |
|
| 22 |
void HelperFun2() { HelperFun1(); } |
| 23 |
|
| 24 |
const int K1 = 1; |
| 25 |
} // namespace |
| 26 |
|
| 27 |
static const int K2 = 2; |
| 28 |
static 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 |
|
| 37 |
static void HelperFun4() {} |
| 38 |
static void HelperFun6() {} |
| 39 |
|
| 40 |
void Class1::f() { HelperFun2(); } |
| 41 |
|
| 42 |
void Class2::f() { |
| 43 |
HelperFun1(); |
| 44 |
HelperFun3(); |
| 45 |
} |
| 46 |
|
| 47 |
void Class3::f() { HelperC1::I; } |
| 48 |
|
| 49 |
void Class4::f() { HelperC2 c2; } |
| 50 |
|
| 51 |
void Class5::f() { |
| 52 |
int Result = K1 + K2 + K3; |
| 53 |
HelperFun4(); |
| 54 |
} |
| 55 |
|
| 56 |
int Class6::f() { |
| 57 |
int R = K4; |
| 58 |
return R; |
| 59 |
} |
| 60 |
|
| 61 |
int Class7::f() { |
| 62 |
int R = K6; |
| 63 |
return R; |
| 64 |
} |
| 65 |
|
| 66 |
int Class7::g() { |
| 67 |
HelperFun6(); |
| 68 |
return 1; |
| 69 |
} |
| 70 |
|
| 71 |
static int HelperFun5() { |
| 72 |
int R = K5; |
| 73 |
return R; |
| 74 |
} |
| 75 |
|
| 76 |
void Fun1() { HelperFun5(); } |
| 77 |
|
| 78 |
} // namespace a |
| 79 |
|
| 80 |
namespace b { |
| 81 |
namespace { |
| 82 |
void HelperFun7(); |
| 83 |
|
| 84 |
class HelperC4; |
| 85 |
} // namespace |
| 86 |
|
| 87 |
void Fun3() { |
| 88 |
HelperFun7(); |
| 89 |
HelperC4 *t; |
| 90 |
} |
| 91 |
|
| 92 |
namespace { |
| 93 |
void HelperFun7() {} |
| 94 |
|
| 95 |
class HelperC4 {}; |
| 96 |
} // namespace |
| 97 |
} // namespace b |