summaryrefslogtreecommitdiff
path: root/test/cedet/tests/scopetest.cpp
blob: cb425c8b0659aa99c6c285c9b8f49b717537b649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* Test scoping rules for c++ in the analyzer. */

namespace {

  class aclass2;  // Forward reference.

  class aclass1 {
  private:
    int attrp1;
    int amethodp1(int argp1);
    aclass2 areference;
  protected:
    int attrpr1;
  public:
    int attr1;
    int amethod1(int arg1);
  };
}

namespace {
  class aclass2 : public aclass1
  {
  private:
    int attrp2;
    int amethodp2(int argp1);
  public:
    aclass2(int aninitvalue);
    ~aclass2();
    int attr2;
    int amethod2(int arg2);
  };
}

aclass2::aclass2(init aninitvalue)
{
  /* This is a comment that talks about aclass1 */
  aclass1;
}

int aclass2::amethod2(int arg2)
{
  int alocalvar;
  float q;

  ac;
}

// arch-tag: 9336063c-6b2e-4677-a390-d2dd091a2474