Hi,
> We can see, that the occurence found in SimulationMPI.cxx file
> on the line 32 is not a call, but a declaration.

The current C++ built-in parser considers a declaration as a reference.

> So, is there any way, how to detect only function calls?

There is no way except for rewriting the parser.

Regards,
Shigio


2016-08-19 21:03 GMT+09:00 Martin Beseda <[email protected]>:

> To whom it may concern,
>
> I need to detect function calls in C and C++. I need to detect calls
> exclusively (with line numbers), without functions' declarations etc.
>
>
>
> I've tried to use it like this:
>
> gtags -f fileList.txt
>
> global -r -x exchangeSizes
>
>
>
> But when I'm trying to parse some C++ codes, I'm encountering problems
> like this:
>
>
>
> /projects/p_readex/amt/ProxyApps/FOO/lassen_FOO> 
> /projects/p_readex/amt/libraries/global-6.5.4/global/global -r -x 
> exchangeSizes
> exchangeSizes      22 SimulationMPI.cxx void exchangeSizes( MPI_Comm comm,
> exchangeSizes      32 SimulationMPI.cxx void exchangeSizes( MPI_Comm comm,
> exchangeSizes     319 SimulationMPI.cxx    exchangeSizes( comm, 
> overlapDomains, isFacetNeighbor, recvIsFacetNeighbor);
> exchangeSizes     519 SimulationMPI.cxx    exchangeSizes( comm, neighbors, 
> sendSize, recvBufferSize );
> exchangeSizes     533 SimulationMPI.cxx    exchangeSizes( comm, neighbors, 
> sendBuffer, recvSizes );
>
>
> SimulationMPI.cxx:
>
>  31 template<class T>
>  32 void exchangeSizes( MPI_Comm comm,
>  33                     const std::vector<int> &neighbors,
>  34                     const std::vector< std::vector<T> > &sendBuffer,
>  35                     std::vector<int> &recvBufferSize);
>  36
>  37
>
>
> We can see, that the occurence found in SimulationMPI.cxx file on the line 32 
> is not a call, but a declaration.
>
> So, is there any way, how to detect only function calls?
>
>
> Thank you very much.
>
> Best regards,
> Martin
>
> P.s.: The parsed project is attached.
>
>
>
> _______________________________________________
> Help-global mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/help-global
>
>


-- 
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
_______________________________________________
Help-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-global

Reply via email to