brintos

brintos / llvm-project-archived public Read only

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