Add a flag indicating whether to trust isFileScope from ctags
commitdb5d7e5cac00de7f9e2aee48b05bde5397370dd2
authorJiří Techet <techet@gmail.com>
Mon, 8 May 2023 11:34:08 +0000 (8 13:34 +0200)
committerJiří Techet <techet@gmail.com>
Mon, 15 May 2023 21:09:21 +0000 (15 23:09 +0200)
tree4566c7fd83f045b4707274f1d856e0163b745246
parent1d9681d78c0294c8c29925cdc89c2d8ae19b5abf
Add a flag indicating whether to trust isFileScope from ctags

ctags treats unknown C/C++ file extensions as if they were source
files. Because of this, the isFileScope flag is incorrectly set
to TRUE for such files even if they are headers and the defined
tags don't have a file-only scope.

To fix this, we intorduce a flag called trust_file_scope which we
set to TRUE only when the source file name matches one of the
known C/C++ extensions.

For all other languages the flag is set to TRUE.
src/tagmanager/tm_source_file.c
src/tagmanager/tm_source_file.h