You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SELF-INCOMPATIBLE]C++: introduce "using" role to "namespace" kind
WARNING: This change deletes "using" kind from C++ language.
"foo" in "using namespace foo;" was captured as using kind.
However, "foo" is not defined in the statement.
"foo" is referred as a namespace defined somewhere.
Therefore, ctags should not capture "foo" as a definition tag.
Instead, ctags should capture it as a reference tag.
The original code captures "foo" as a definition tag of "using" kind.
This change captures "foo" as a reference tag of "using" role of
"namespace" kind.
$ cat /tmp/foo.hh
using namespace std::cout;
$ ./ctags -o - /tmp/foo.hh
$ ./ctags -o - --extras=+r /tmp/foo.hh
std::cout /tmp/foo.hh /^using namespace std::cout;$/;" n
$ ./ctags -o - --extras=+r --fields=+K /tmp/foo.hh
std::cout /tmp/foo.hh /^using namespace std::cout;$/;" namespace
$ ./ctags -o - --extras=+r --fields=+Kr /tmp/foo.hh
std::cout /tmp/foo.hh /^using namespace std::cout;$/;" namespace roles:using
$ ./ctags --list-roles=C++.namespace
#KIND(L/N) NAME ENABLED DESCRIPTION
n/namespace using on specified with "using namespace"
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
0 commit comments