Get members from the same file as the type/struct/union
commit1281d0c942322d99da626ad00edd6077425f2c8d
authorJiří Techet <techet@gmail.com>
Sun, 10 May 2015 19:04:20 +0000 (10 21:04 +0200)
committerJiří Techet <techet@gmail.com>
Sun, 10 Jan 2016 11:33:40 +0000 (10 12:33 +0100)
treee5cbb1aed8c040edc30ce7150f7d405769eca457
parent30fa28bac7d8c5928dd613c34d5d833b3dfead2b
Get members from the same file as the type/struct/union

Rethink how to extract members from the struct types. Inspired by
the patch using the same file as the typedef to search for structs,
we can do the same to extract the members only from the file
containing the struct and not the whole workspace. This makes
this operation fast enough so we don't have to keep the extracted
members in a special array (this will become especially useful
for namespace search because for it we would have to extract
all tags and then the extracted array would have the same
size as the workspace so we'd lose the performance gain).

Since the above works only for tags having the file information,
that is, not the global tags, we'll lose some performance
when searching the global tags. I think people don't create
the tag files for complete projects but rather for header files
which contain less tags and still the performance should be
better than before this patch set because we go through the
global tag list only once (was twice before).

On the way, clean up the source a bit, add more comments and move
some code from find_scope_members() to find_scope_members_tags().
tagmanager/src/tm_workspace.c
tagmanager/src/tm_workspace.h