summaryrefslogtreecommitdiff
path: root/test/cedet/tests/testfriends.cpp
blob: 20425f93afa9ea2ce9090ee1dacbb3d31a45aa61 (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
// Test parsing of friends and how they are used in completion.
/*
  >>  Thanks Damien Profeta for the nice example.
  >
  >  I paste a small example.
  >  It would be great if friend can be well parsed and even greater if
  >  class B can access to all the members of A.
*/

class Af // %2% ( ( "testfriends.cpp" ) ( "Af" "B::testB" ) )
{
public:
  int pubVar;
private:
  int privateVar;

  friend class B;

};

class B
{
public:
  int testB();
  int testAB();

};


int B::testB() {
  Af classA;
  classA.//-1-
    ; //#1# ( "privateVar" "pubVar" )
}

int B::testAB() { // %1% ( ( "testfriends.cpp" ) ( "B" "B::testAB" ) )
}