view test/cedet/tests/testfriends.cpp @ 108635:e565448628b8

Set rallocobj with configure, not cpp. * configure.in (REL_ALLOC): Unset on gnu, gnu-linux if DOUG_LEA_MALLOC. (RALLOC_OBJ): New output variable. * config.bat (RALLOC_OBJ): Edit to empty if sys_malloc. * src/Makefile.in (RALLOC_OBJ): New, set by configure. (rallocobj): Replace with the previous variable. (otherobj): Use $RALLOC_OBJ. * src/s/gnu.h (REL_ALLOC) [DOUG_LEA_MALLOC]: * src/s/gnu-linux.h (REL_ALLOC) [DOUG_LEA_MALLOC]: Move undef to configure. * msdos/sed1v2.inp (RALLOC_OBJ): Edit to ralloc.o.
author Glenn Morris <rgm@gnu.org>
date Mon, 17 May 2010 19:44:07 -0700
parents 7f4c7f5c0eba
children ef719132ddfa
line wrap: on
line source

// 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" ) )
}

// arch-tag: 31ea93db-59f8-4301-8e32-06536358618e