Menu

#25 type tooltip of variable is wrong

open
5
2012-09-26
2003-01-28
No

IN the attached rar file you can find a very short
dummy project.
Let's focus on the main function :
int main(int argc, char *argv[])
{
test_t test = value1;
test = (test_t)1;
f((test_t)yes);
int variable =0;
{
char variable;
variable +=10;
}
// system("PAUSE");
return 0;
}

problem 1 : no type info when cursor is over argv (argc
is ok)
problem 2 : no type info when cursor is over first
occurence of the variable test (on the next line it is ok)
problem 3 : no type info when cursor is over first
occurence of the variable 'variable' (analog to problem 2)
problem 4 : type info when cursor is over occurence 2
and 3 of variable 'variable' and it says int !!! where
now we are in a different scope and it should be char !

Problem or not implemented : no info when cursor is
over a value from an enum. Would be good that it was
shown of what enum type the value came.

Cheers,
Lieven

Discussion

  • Lieven de Cock

    Lieven de Cock - 2003-01-28
     
  • Oliver Stöneberg

    Logged In: YES
    user_id=591019

    check bug #634363. a similar bug reported by me quite a
    while ago and not fixed yet.

     
  • Lieven de Cock

    Lieven de Cock - 2004-11-27

    Logged In: YES
    user_id=602705

    I just have retested this bug report with version 4.9.9.1, a
    version downloaded from www.castlesofpoland.com on 27
    november 2004, and I can confirm all mentioned bugs are
    still present.

    Lieven

     
  • Lieven de Cock

    Lieven de Cock - 2004-11-27

    Logged In: YES
    user_id=602705

    I just have retested this bug report with version 4.9.9.1, a
    version downloaded from www.castlesofpoland.com on 27
    november 2004, and I can confirm all mentioned bugs are
    still present.

    Lieven

     
  • Lieven de Cock

    Lieven de Cock - 2004-11-27

    Logged In: YES
    user_id=602705

    As for probem 1, I experimented a bit, these are the results :

    Each time we just change the prototype of the main function
    1) int main(int argc, char argv)
    --> tooltips OK
    2) int main(int argc, char
    argv)
    --> tooltips OK
    3) int main(int argc[], char* argv)
    --> NO tooltip for argc, it seems that during the lookup
    of the variable name, the [] were not removed and the
    variable is probably only known as argc in the lookup table
    (assuming there's a lookup table).
    Now add as the first statement in the main function :
    argc = 0; ---> NO tooltip (when switching back to int argc
    in the main, then there's a tooltip)
    Here we can/could conclude something different, the lookup
    on this line should happen on the name argc (correct name,
    nothing attached to it), so maybe the variable is not in the
    lookup table like that, maybe it is in the lookuptable as
    argc[] . Then it is well possible that the lookup in the
    main prototype line was removing the [] from argc[] and thus
    looking up argc, but if it is in the lookputable as argc[]
    then offcourse there's no match.

    Lieven

    PS : this main function is dummy !! normally you get an
    array on argv and not on argc, I reasoned on argc, to remove
    the pointer fact.

    PS 2 : the tooltip for argc in the case of int argc[] should
    be either int*, and prefarrably int [] .

     
  • Lieven de Cock

    Lieven de Cock - 2004-11-27

    Logged In: YES
    user_id=602705

    Some more testing material, I hace attached another file
    'temp.cpp', this is the contents :
    class CPoint
    {
    int x;
    int y;
    CPoint(int xvar, int yvar);
    Set(int varx, int vary);
    };

    int main(int argc, char* argv)
    {
    system("PAUSE");
    return 0;
    }

    CPoint::CPoint(int xvar, int yvar)
    {
    x = 5;
    y = 5;
    }

    Focus on the CPoint class, in the class definition, hover
    the mouse of xvar, yvar of the constructor --> correct tooltips.
    Now go to the implementation of the constructor -- > No
    tooltips, change the CPoint::CPoint to CPoint::Unknown -->
    correct tooltips, change ot to CPoint::Set --> NO tooltips.

     
  • Lieven de Cock

    Lieven de Cock - 2004-11-27
     
  • Lieven de Cock

    Lieven de Cock - 2004-11-27

    Logged In: YES
    user_id=602705

    Something else which is weird/wrong. Go either to class
    definition or implementation of the CPoint constructor. Put
    the focus by clicking just in front of the first int (so
    after the ( ).
    Nothing happens, now press spacebar once --> function type
    tooltip showing up ---> but 2/2 ?? Then press either up or
    down arrow in the tooltip and look at the right hand side of
    the tooltip rectangle, click either arrow again. (it shrinks
    and grows)

    Hope some fixes arrive on the tooltips, since it's a damn
    good feature, but not when it's buggy (definetely not when
    it is showing wrong information).

    kind regards,
    Lieven

     
  • Marek Januszewski

    Logged In: YES
    user_id=609236

    nothing related to c++ parser is going to be fixed by the
    next version. so bugs like that are definitely not fixed

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.