Mailing List efte-dev@2rosenthals.com Archived Message #42

From: "Alfredo Fernández Díaz" <efte-dev@2rosenthals.com> Full Headers
Undecoded message
Subject: Re: [eFTE-dev] Ctags
Date: Tue, 14 Mar 2017 19:48:27 +0100
To: eFTE Developers Mailing List <efte-dev@2rosenthals.com>

Hi,

Gregg Young wrote:
On Fri, 29 Dec 2017 21:11:40 +0100 Alfredo Fern�ndez D�az wrote:
...
IIRC you should be able to find all occurrences of any
single tag, I just checked the latest eFTEPM build and it
seems to work, but I don't have a lot of stuff for
checking right now.

I worked with this some more. It is probably working as
designed. It finds all the definitions of a function but
doesn't find all the places it is called from. You can start
from a place where the function is called and it will find
every definition (C++ same function in different classes).
I can return to the original caller but it won't take me to
any other place it is called from.

OK, now I see what you were trying to do.

"ctags --list-kinds=c++" outputs:

> c  classes
> d  macro definitions
> e  enumerators (values inside an enumeration)
> f  function definitions
> g  enumeration names
> l  local variables [off]
> m  class, struct, and union members
> n  namespaces
> p  function prototypes [off]
> s  structure names
> t  typedefs
> u  union names
> v  variable definitions
> x  external and forward variable declarations [off]

You can add C++ function invocations to the ctags config file, ".ctags". Assuming function invocations always look like an equal sign followed by [spaces or tabs and] some alphanumeric string plus an opening parenthesis, and the above doesn't conflict with the definitions of the other tag "kinds" for C++ (can't check right now), you would need something like this in .ctags:

--regex-c++=/=[ \t]*([A-Za-z0-9_-])+\(/\1/i,inv,invocations/

And then you'll get function invocations in your TAGS file.

Hope this helps.

[...]
Enjoy your trip. Don't worry about response time. Thanks

Happy New Year!

Happy 2018! :)
Alfred.

Subscribe: Feed, Digest, Index.
Unsubscribe
Mail to ListMaster