From ddf3fb3d5ba06cc2a3c85b300099d5e373212a93 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Wed, 10 May 2023 05:08:52 +0900 Subject: [PATCH] Fortran: fix wrongly specified xtag type Signed-off-by: Masatake YAMATO --- .../fortran-linkname.d/args.ctags | 1 + .../fortran-linkname.d/expected.tags | 16 ++++++++-------- parsers/fortran.c | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Units/parser-fortran.r/fortran-linkname.d/args.ctags b/Units/parser-fortran.r/fortran-linkname.d/args.ctags index 731b54160c..5405afb1e9 100644 --- a/Units/parser-fortran.r/fortran-linkname.d/args.ctags +++ b/Units/parser-fortran.r/fortran-linkname.d/args.ctags @@ -1,2 +1,3 @@ --sort=no --extras-Fortran={linkName} +--fields=+{extras} diff --git a/Units/parser-fortran.r/fortran-linkname.d/expected.tags b/Units/parser-fortran.r/fortran-linkname.d/expected.tags index d16248b30a..b0b9fe4574 100644 --- a/Units/parser-fortran.r/fortran-linkname.d/expected.tags +++ b/Units/parser-fortran.r/fortran-linkname.d/expected.tags @@ -1,5 +1,5 @@ my_mod input.f /^ module my_mod$/;" m -__anon9b9a88660103 input.f /^ enumerator :: my_constr = 1, my_second_constr = 4$/;" E module:my_mod +__anon9b9a88660103 input.f /^ enumerator :: my_constr = 1, my_second_constr = 4$/;" E module:my_mod extras:anonymous my_constr input.f /^ enumerator :: my_constr /;" N enum:__anon9b9a88660103 my_second_constr input.f /^ enumerator :: my_constr = 1, my_second_constr /;" N enum:__anon9b9a88660103 my_type input.f /^ type my_type$/;" t module:my_mod @@ -12,22 +12,22 @@ a input.f /^ integer a$/;" k type:my_sequence_type b input.f /^ integer b$/;" k type:my_sequence_type my_mod_type input.f /^ type(my_sequence_type) :: my_mod_type$/;" v module:my_mod my_mod_common input.f 23;" c module:my_mod -my_mod_common_ input.f 23;" c module:my_mod +my_mod_common_ input.f 23;" c module:my_mod extras:linkName my_func input.f /^ function my_func(/;" f module:my_mod -my_func_ input.f /^ function my_func(x)$/;" f module:my_mod +my_func_ input.f /^ function my_func(x)$/;" f module:my_mod extras:linkName my_block input.f /^ block data my_block$/;" b -my_block_ input.f /^ block data my_block$/;" b +my_block_ input.f /^ block data my_block$/;" b extras:linkName my_var input.f /^ integer my_var$/;" v blockData:my_block my_common input.f 40;" c blockData:my_block -my_common_ input.f 40;" c blockData:my_block +my_common_ input.f 40;" c blockData:my_block extras:linkName my_subr input.f /^ subroutine my_subr$/;" s -my_subr_ input.f /^ subroutine my_subr$/;" s +my_subr_ input.f /^ subroutine my_subr$/;" s extras:linkName my_entry input.f /^ entry my_entry$/;" e subroutine:my_subr -my_entry_ input.f /^ entry my_entry$/;" e subroutine:my_subr +my_entry_ input.f /^ entry my_entry$/;" e subroutine:my_subr extras:linkName my_main input.f /^ program my_main$/;" p my_interface input.f /^ interface my_interface$/;" i program:my_main my_var input.f /^ integer my_var$/;" v program:my_main my_namelist input.f /^ namelist \/my_namelist\//;" n program:my_main my_conc_type input.f /^ type(my_type) :: my_conc_type$/;" v program:my_main my_common input.f 64;" c program:my_main -my_common_ input.f 64;" c program:my_main +my_common_ input.f 64;" c program:my_main extras:linkName diff --git a/parsers/fortran.c b/parsers/fortran.c index 2787c71857..463aa020e6 100644 --- a/parsers/fortran.c +++ b/parsers/fortran.c @@ -601,7 +601,7 @@ static void makeFortranLinkNameTag(tagEntryInfo *e) tagEntryInfo ln_e = *e; ln_e.name = vStringValue (ln); - markTagExtraBit (&ln_e, X_LINK_NAME); + markTagExtraBit (&ln_e, FortranXtagTable[X_LINK_NAME].xtype); makeTagEntry (&ln_e); vStringDelete (ln); }