Should index X::Y() as well as Y()
Brought to you by:
ajlittoz
For C++ and other OO languages, we should index both
the full scoped name of the function (ie
Class::Function()) as well as just Function().
This looks easy(ish) to do - ctags already spits out
the class of a method in the extended information, and
it would be easy to insert another entry for the full
name. References would be harder - it's much more
difficult if not impossible to determine what function
a callsite will actually resolve to except by doing a
full compile. So we might have to settle for indexing
the declarations of the fully scoped names but not the
references, or strip out scope when running ident.
Logged In: NO
Also C++ namespace scoping does not work... and is similar
in syntax.. not sure if another bug should be created or not...
//in somefile.h
namespace ns{ class Foo{};};
//in some_other_file.cpp
void func(){
ns::Foo f; //<-- will not be linked
}
unfortunately, his affects about 90% of my code...
Logged In: NO
Also C++ namespace scoping does not work... and is similar
in syntax.. not sure if another bug should be created or not...
//in somefile.h
namespace ns{ class Foo{};};
//in some_other_file.cpp
void func(){
ns::Foo f; //<-- will not be linked
}
unfortunately, his affects about 90% of my code...
In source files when functions are defined it'd also be good to have the
ClassName::FunctionName
| |
URL URL
to to
ident ident
search search
for for
ClassName ClassName::FunctionName
My text layout just got chomped. So what I meant was that for a function definition (ClassName::FunctionName) in a source file it'd be good if LXR added a URL to an ident search for ClassName around the ClassName text but a URL to an ident search for ClassName::FunctionName around the FunctionName text.
[lxr-2.2.1] The typical thing to note here is while searching for "Y" in /ident, it returned "X::Y()" as reference link. On clicking on that link it opened /ident in new tab with "X3A3AY" as default search text. Since LXR doesn't index X::Y() it showed no results.
As a workaround I have edited perl subroutine 'idref' defined in "Common.pm" to truncate "X3A3A" from search text.
Please attach your patcj so that I can merge it into the master branch.