#212 Incorrect extraction of function names for C++ code

closed-invalid
None
5
2008-02-18
2008-02-17
No

Hello,

I'm doing a lot of development with wxWidgets (using C++). To fix warnings of unused variables for different compilers, wxWidgets use the WXUNUSED macro to guard them. This macro is then differently defined for different compilers.

This is usually used in event handlers (and since it's GUI programming, there are a lot of them). Functions look like this:

void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event))

This seems to confuse ctags, which output WXUNUSED instead of real function name:

WXUNUSED ExecuteSqlFrame.cpp /^void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event))

instead of:

OnSqlEditUpdateUI ExecuteSqlFrame.cpp /^void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event))

Please let me know if there are anyworkarounds I can use until it's fixed.

Thanks.

Discussion

  • Elliott Hughes

    Elliott Hughes - 2008-02-18
    • assigned_to: nobody --> elliotth
    • status: open --> closed-invalid
     
  • Elliott Hughes

    Elliott Hughes - 2008-02-18

    Logged In: YES
    user_id=1127237
    Originator: NO

    not a bug. see the -I section of the manual, or try:

    lithium:/tmp$ cat x.cpp
    void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event)) {
    }
    lithium:/tmp$ ctags -o - x.cpp
    WXUNUSED x.cpp /^void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event)) {$/;" f class:ExecuteSqlFrame
    lithium:/tmp$ ctags -IWXUNUSED -o - x.cpp
    OnSqlEditUpdateUI x.cpp /^void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event)) {$/;" f class:ExecuteSqlFrame
    lithium:/tmp$

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks