Mercurial > emacs
comparison test/cedet/tests/scopetest.cpp @ 105267:c99cf31de3f2
Add CEDET tests.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Mon, 28 Sep 2009 23:23:31 +0000 |
parents | e480034314ce |
children | 7f4c7f5c0eba |
comparison
equal
deleted
inserted
replaced
105266:c02e98221afe | 105267:c99cf31de3f2 |
---|---|
1 /* Test scoping rules for c++ in the analyzer. */ | |
2 | |
3 namespace { | |
4 | |
5 class aclass2; // Forward reference. | |
6 | |
7 class aclass1 { | |
8 private: | |
9 int attrp1; | |
10 int amethodp1(int argp1); | |
11 aclass2 areference; | |
12 protected: | |
13 int attrpr1; | |
14 public: | |
15 int attr1; | |
16 int amethod1(int arg1); | |
17 }; | |
18 } | |
19 | |
20 namespace { | |
21 class aclass2 : public aclass1 | |
22 { | |
23 private: | |
24 int attrp2; | |
25 int amethodp2(int argp1); | |
26 public: | |
27 aclass2(int aninitvalue); | |
28 ~aclass2(); | |
29 int attr2; | |
30 int amethod2(int arg2); | |
31 }; | |
32 } | |
33 | |
34 aclass2::aclass2(init aninitvalue) | |
35 { | |
36 /* This is a comment that talks about aclass1 */ | |
37 aclass1; | |
38 } | |
39 | |
40 int aclass2::amethod2(int arg2) | |
41 { | |
42 int alocalvar; | |
43 float q; | |
44 | |
45 ac; | |
46 } | |
47 |