[GCC-XML] Tag location for function and method.
Brad King
brad.king at kitware.com
Tue Feb 22 15:29:56 EST 2005
James Fowler wrote:
>> Brice Orsaud wrote:
>>> In XML the tag location for a function stands for the file where the
>>> function is defined. In my case I would like to change this file by
>>> file where the function is declared (if it exists). I would like to
>>> know if it’s possible, and what files are impacted by this modification.
> One thing that might help: remember that this is not a problem if GCC
> only sees the declaration. If you can parse just the header file
> separately from the .cpp file, that should give you the location in
> which it was declared (assuming you aren't stuck with the declaration
> and definition in the same file...). I suspect that this is the
> simplest way to get the location of the declaration.
You can also put the definition inside a preprocessor block that knows
about GCC-XML:
void foo();
#ifndef __GCCXML__
void foo() {}
#endif
and then GCC-XML will never see the definition.
-Brad
More information about the gccxml
mailing list