Re: gtags doesn't index function definitions preceded by a macro resembling a function call
Shigio YAMAGUCHI <[email protected]> Sat, 23 Sep 2017 07:15:15 +0900
| Newsgroups | gmane.comp.gnu.global.general |
|---|---|
| Message-ID | <CADJmJYo9xVBNe9cOeK6EaEn=0T29GyjNJ7p2jhnHR=wUJST5mg@mail.gmail.com> |
--===============2925858186820273570== Content-Type: multipart/alternative; boundary="f40304398f9c2158530559ce8b6b" --f40304398f9c2158530559ce8b6b Content-Type: text/plain; charset="UTF-8" Hello, > Is there a way to maybe ignore the FUNC macro or maybe > expanding the macro before searching for tags or some > similar methods? Would you please make '.notfunction' file in the project root directory? Gtags does not regard the symbols listed there as definitions. [.notfunction] +------------------- |FUNC +------------------- $ vi .notfunction $ gtags Since this is not written in the online manual, I am going to add a description about it. Regards, Shigio 2017-09-22 17:36 GMT+09:00 Mihai Olteanu <[email protected]>: > Hello, > > I'm using gtags 6.5.4 for a C project. Some of the function names are in > the following format: > *FUNC(void, MY_CODE) My_Function*(void) { > ... > } > > where FUNC is a macro defined as > *#define FUNC(rettype, memclass) rettype* > > The global command doesn't find *My_Function *but only a lot of *FUNC*s. > So gtags is seeing *FUNC* as a function name and adds that to the list of > tags and not *My_Function*. > Is there a way to maybe ignore the FUNC macro or maybe expanding the macro > before searching for tags or some similar methods? > > Mihai > > _______________________________________________ > Help-global mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/help-global > > -- Shigio YAMAGUCHI <[email protected]> PGP fingerprint: 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB --f40304398f9c2158530559ce8b6b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hello,</div><div>> Is there a way to maybe ignore = the FUNC macro or maybe</div><div>> expanding the macro before searching= for tags or some</div><div>> similar methods?</div><div><br></div><div>= Would you please make '.notfunction' file in the project=C2=A0</div= ><div>root directory? Gtags does not regard the symbols listed=C2=A0</div><= div>there as definitions.</div><div><br></div><div>[.notfunction]</div><div= >+-------------------</div><div>|FUNC</div><div>+-------------------</div><= div><br></div><div>$ vi .notfunction</div><div>$ gtags</div><div><br></div>= <div>Since this is not written in the online manual,=C2=A0</div><div>I am g= oing to add a description about it.</div><div><br></div><div>Regards,</div>= <div>Shigio</div><div><br></div></div><div class=3D"gmail_extra"><br><div c= lass=3D"gmail_quote">2017-09-22 17:36 GMT+09:00 Mihai Olteanu <span dir=3D"= ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">mih= [email protected]</a>></span>:<br><blockquote class=3D"gmail_quote"= style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u= ></u> <div><div style=3D"font-family:verdana,sans-serif">Hello,</div> <div style=3D"font-family:verdana,sans-serif"><br></div> <div style=3D"font-family:verdana,sans-serif">I'm using gtags 6.5.4 for= a C project. Some of the function names are in the following format:</div> <div style=3D"font-family:verdana,sans-serif"><i>FUNC(void, MY_CODE) My_Fun= ction</i>(void) {</div> <div style=3D"font-family:verdana,sans-serif">...</div> <div style=3D"font-family:verdana,sans-serif">}<br></div> <div style=3D"font-family:verdana,sans-serif"><br></div> <div style=3D"font-family:verdana,sans-serif">where FUNC is a macro defined= as</div> <div style=3D"font-family:verdana,sans-serif"><i>#define FUNC(rettype, memc= lass) rettype</i></div> <div style=3D"font-family:verdana,sans-serif"><i><br></i></div> <div style=3D"font-family:verdana,sans-serif">The global command doesn'= t find <i>My_Function </i>but only a lot of <i>FUNC</i>s.</div> <div style=3D"font-family:verdana,sans-serif">So gtags is seeing <i>FUNC</i= > as a function name and adds that to the list of tags and not <i>My_Functi= on</i>.</div> <div style=3D"font-family:verdana,sans-serif">Is there a way to maybe ignor= e the FUNC macro or maybe expanding the macro before searching for tags or = some similar methods?<span class=3D"HOEnZb"><font color=3D"#888888"><br></f= ont></span></div><span class=3D"HOEnZb"><font color=3D"#888888"> <div style=3D"font-family:verdana,sans-serif"><br></div> <div style=3D"font-family:verdana,sans-serif">Mihai<br></div> </font></span></div> <br>______________________________<wbr>_________________<br> Help-global mailing list<br> <a href=3D"mailto:[email protected]">[email protected]</a><br> <a href=3D"https://lists.gnu.org/mailman/listinfo/help-global" rel=3D"noref= errer" target=3D"_blank">https://lists.gnu.org/mailman/<wbr>listinfo/help-g= lobal</a><br> <br></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div cla= ss=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr">= <div><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><d= iv dir=3D"ltr">Shigio YAMAGUCHI <<a href=3D"mailto:[email protected]" targe= t=3D"_blank">[email protected]</a>></div><div dir=3D"ltr"><div dir=3D"ltr">= PGP fingerprint:=C2=A0</div><div dir=3D"ltr">26F6 31B4 3D62 4A92 7E6F =C2= =A01C33 969C 3BE3 89DD A6EB</div></div></div></div></div></div></div></div>= </div> </div> --f40304398f9c2158530559ce8b6b-- --===============2925858186820273570== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-global mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-global --===============2925858186820273570==--