Author Topic: Another completion oddity  (Read 24533 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Another completion oddity
« Reply #15 on: August 17, 2009, 11:17:33 am »
Quote
If I right-click on "bbbbb" and choose "Find declaration", I receive the following warning: "Not found: bbbbb".

If I do the same on "tttt" or "Tstruct", it works ok though. (just giving you all information I have).
This is by design. :D
Because all the local variables will be skipped by the parser. So, bbbbb is not in the TokenSearchTree.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: Another completion oddity
« Reply #16 on: August 17, 2009, 12:28:15 pm »
ollydbg's explanation is right.
the variable defined in function body can not work with "find declaration",so...
« Last Edit: August 17, 2009, 12:30:21 pm by blueshake »
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: Another completion oddity
« Reply #17 on: August 17, 2009, 01:40:35 pm »
First of all, regarding oBFusCATed response:

daniloz: C++ is hard to parse even when the code is correct, parsing malformed code is massive(close to impossible) task

Ok, I understand the complexity of parsing c++ code and really appreciate the work you guys (you know how you are) have done so far. It was just an user wish... :) After all, I cannot be blamed for it (or can I? ;) )

About local variables, isn't that something that can be done since C::B already know about them. Should it be too difficult to link them with the declaration? (of course I miss the bigger picture here, but again, just an user wish...)

Thank you all for the replies...


Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: Another completion oddity
« Reply #18 on: August 17, 2009, 03:03:21 pm »
the local variable is stored in a temptree.and the the function body is parsed in real time.
the temptree changed every time,if my understand is right.it is not possible to implement
the functin in current version.
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?