bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gtags fail to index C++ exported class


From: Shigio YAMAGUCHI
Subject: Re: gtags fail to index C++ exported class
Date: Sat, 6 Dec 2014 09:40:45 +0900

The parser is already improved remarkably than 6.3.3 by your work.
I'm very sorry for my making many requests. But, ... just one more.

New parser ignores some symbols which are not definition.

[Example-1]

In the following source code, SLOP (in line 8) and menu (in line 7, 8)
are ignored by the -rs option. They are not picked up even by the -d
by the -rs.

$ cat -n test.cpp
     1  /*
     2   * This code was derived from linux-3.17.4.
     3   */
     4  a() {
     5          struct menu *menu = NULL;
     6
     7          connect(configList, SIGNAL(menuSelected(struct menu *)),
     8                  SLOT(changeMenu(struct menu *)));
     9  }
$ gtags
$ global -xrs '.*'
NULL                5 test.cpp          struct menu *menu = NULL;
SIGNAL              7 test.cpp          connect(configList, SIGNAL(menuSelected(struct menu *)),
changeMenu          8 test.cpp                         SLOT(changeMenu(struct menu *)));
configList          7 test.cpp          connect(configList, SIGNAL(menuSelected(struct menu *)),
connect             7 test.cpp          connect(configList, SIGNAL(menuSelected(struct menu *)),
menu                5 test.cpp          struct menu *menu = NULL;
menuSelected        7 test.cpp          connect(configList, SIGNAL(menuSelected(struct menu *)),

[Example-2]

The following result seems to be your intention.

$ cat -n test.cpp
     1  class {};
     2  class Ignore1;
     3  class EXTERN Ignore2;
     4  class C1 {};
     5  class EXTERN C2 {};
     6  class
     7  {};
     8  class
     9  C3 {};
    10  class
    11  C4
    12  {};
    13  class
    14  EXTERNAL
    15  C5
    16  {};
$ gtags
$ global -xrs '.*'
$ _

However, the following symbols are not picked up even by the -d
by the -rs option.

Ignore1 (line 2)
EXTERN (line 3)
Ignore2 (line 3)
EXTERNAL (line 14)

I think that they should be picked up by the -rs option.
Otherwise, we have many symbols that cannot be search.
What do you think?

Shigio


2014-12-03 16:39 GMT+09:00 Jason Hood <address@hidden>:
> It seems that the latest patch also includes a problem.

I forgot to reply-all again and Shigio pointed out yet another problem (sheesh, I'm useless), so here's hopefully the final patch, based on the original 6.3.3 source.

--
Jason.



--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]