#29 Should index X::Y() as well as Y()

current_cvs
open
3
2009-03-26
2001-11-14
Malcolm Box
No

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.

Discussion

  • Nobody/Anonymous

    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...

     
  • Nobody/Anonymous

    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...

     
  • Malcolm Box

    Malcolm Box - 2009-03-26
    • priority: 6 --> 3
     
  • AdrianIssott

    AdrianIssott - 2009-06-20

    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

     
  • AdrianIssott

    AdrianIssott - 2009-06-20

    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.

     

Log in to post a comment.