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
 Bug in the method list combo
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

DBlake
Starting Member

1 Posts

Posted - Jun 04 2025 :  2:01:04 PM  Show Profile  Reply with Quote
VA stops displaying the list of methods in a file if these methods are in namespace with exactly the same name as the define macro in a completely different file, and they do not overlap together during compilation.
I tried to understand why this happens for a long time and made a minimal test solution project in which this bug appears.
Here it is:
https://limewire.com/d/I1Xma#elOjxjXswg

WTR:
1. Download VATestMethodsList.zip
2. open `VATestMet.sln` in VS2022
3. Open the `CLI11.hpp` file.
4. Click on the memebers list.
The result will be this:




Sometimes it helps if you do this, but it's horrible
#define CLI CLI
namespace CLI {
...
}

feline
Whole Tomato Software

United Kingdom
19184 Posts

Posted - Jun 05 2025 :  08:45:08 AM  Show Profile  Reply with Quote
Thank you for the sample code. I am not sure what results I should be getting, but I am certainly seeing a problem with the "do" filter.

Instead of adding the #define to your code, can you please navigate to the folder holding your SLN file, and in this folder create a new, empty text file called "va_stdafx.h", then edit it to have the content:

#define CLI


making sure there is a blank line at the end of the file.� Now press the button:

VA Options -> Performance -> Rebuild symbol databases

and restart Visual Studio.

When rebuilding its symbol database VA looks for this file, and if found, it parses it before parsing anything else in your solution.� Since we look for this file specifically, there is no need to add it to your solution, and in fact it should not be added to your solution, but it should be safe to check it into source control if you want.

This file is used to help our parser make sense of any odd code that it might encounter, especially macros that might cause us problems.

In this case I am using the file to hide the CLI macro from VA.

As for what should be visible in a given file, VA isn't attempting to compile your code. We are trying to be aware of, and help with, types that have not yet been included, since you may be writing the code, only to add the required #include later. In fact we even have the Add Include command to help with this situation.

zen is the art of being at one with the two'ness
Go to Top of Page
   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