|
From: | Shigio YAMAGUCHI |
Subject: | Re: Detection of function calls in C and C++ codes |
Date: | Sat, 20 Aug 2016 07:58:23 +0900 |
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
address@hidden
https://lists.gnu.org/mailman/listinfo/help-global
[Prev in Thread] | Current Thread | [Next in Thread] |