[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang-tools-extra / test / clang-move / Inputs / helper_decls_test.cpp
blob32d2a2348168b70f1a8c88f3dcf63a2605a73e4b
1 #include "helper_decls_test.h"
3 namespace {
4 class HelperC1 {
5 public:
6 static int I;
7 };
9 int HelperC1::I = 0;
11 class HelperC2 {};
13 class HelperC3 {
14 public:
15 static int I;
18 int HelperC3::I = 0;
20 void HelperFun1() {}
22 void HelperFun2() { HelperFun1(); }
24 const int K1 = 1;
25 } // namespace
27 static const int K2 = 2;
28 static void HelperFun3() { K2; }
30 namespace a {
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;
37 static void HelperFun4() {}
38 static void HelperFun6() {}
40 void Class1::f() { HelperFun2(); }
42 void Class2::f() {
43 HelperFun1();
44 HelperFun3();
47 void Class3::f() { HelperC1::I; }
49 void Class4::f() { HelperC2 c2; }
51 void Class5::f() {
52 int Result = K1 + K2 + K3;
53 HelperFun4();
56 int Class6::f() {
57 int R = K4;
58 return R;
61 int Class7::f() {
62 int R = K6;
63 return R;
66 int Class7::g() {
67 HelperFun6();
68 return 1;
71 static int HelperFun5() {
72 int R = K5;
73 return R;
76 void Fun1() { HelperFun5(); }
78 } // namespace a
80 namespace b {
81 namespace {
82 void HelperFun7();
84 class HelperC4;
85 } // namespace
87 void Fun3() {
88 HelperFun7();
89 HelperC4 *t;
92 namespace {
93 void HelperFun7() {}
95 class HelperC4 {};
96 } // namespace
97 } // namespace b