help-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detection of function calls in C and C++ codes


From: Martin Beseda
Subject: Detection of function calls in C and C++ codes
Date: Fri, 19 Aug 2016 14:03:28 +0200
User-agent: Roundcube Webmail/1.0.2

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.



Attachment: lassen_FOO.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]