Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA Navigation Bar list incomplete
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

andreypir
New Member

USA
6 Posts

Posted - Sep 25 2017 :  8:02:43 PM  Show Profile  Reply with Quote
For fairly large .cpp files VA Navigation Bar dropdown does not list some class members.

Andrey Pirozhenko

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Sep 25 2017 :  9:42:48 PM  Show Profile  Reply with Quote
Hey andreypir,

I'm sorry you are having this trouble.

Perhaps there is something specific tripping the parser up. Is there anything you notice that is different about the members that aren't picked up?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 26 2017 :  06:31:21 AM  Show Profile  Reply with Quote
If you set the list to be in Occurrence order:

VA Options -> Display -> Display VA Navigation Bar:
Occurrence

are the missing members grouped together? If so, are they at the end of the file? If something is confusing our parser, then its possible that everything after the problem point is missing from the list. If so, this should help to narrow down the function / part of the file where the confusion is starting.

zen is the art of being at one with the two'ness
Go to Top of Page

andreypir
New Member

USA
6 Posts

Posted - Sep 26 2017 :  1:33:51 PM  Show Profile  Reply with Quote
Thank you, using Occurrence option I was able to locate the problem. Here is a code snippet that makes it trip, the navigation lists F1 but not F2.

HRESULT A::F1() const
{
DWORD a = 0, b = 0, c = 0, d = 0;
#if 1
while (c < d)
{
if (!(b == 0 || (a >= b)))
{
#if 0 // for testing
#endif
}
#else
while (c < d)
{
#endif // 1
}
return S_OK;
}

HRESULT A::F2() const
{
return S_OK;
}

Andrey Pirozhenko
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 26 2017 :  2:40:57 PM  Show Profile  Reply with Quote
Thank you for the very clear example. Since this seems to be a minimum example, the problem goes away when I try simplifying the code any more, have you already found a fix for this in your code? I am happy to help you do so if not.

Mostly our parser is able to recover from code with mismatched brackets due to pre-processor blocks, but not in this case. I have added this example to the case where we are working on this problem:

case=4222

zen is the art of being at one with the two'ness
Go to Top of Page

andreypir
New Member

USA
6 Posts

Posted - Sep 26 2017 :  4:46:34 PM  Show Profile  Reply with Quote
Yes, adding a matching commented out bracket fixes the problem. Thank you for looking into this, and hope to have it fixed as we have more files like this.

Andrey Pirozhenko
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 26 2017 :  5:30:59 PM  Show Profile  Reply with Quote
Thank you for the update, and apologies for the problems this is causing. Partly the problem happens because VA is designed to scan the code inside the #if blocks, even if it is inactive, so that we can help you when you are working on and editing this code. But the side effect is that we see and can be confused by unmatched brackets.

If you don't know about it, selecting lines of code and pressing / or * to comment and uncomment the code is a helpful VA feature that can help you to avoid problems like this, since commented out code is not parsed by VA.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000