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
 Code inspection - override macro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fibbo_ch
New Member

Switzerland
2 Posts

Posted - Oct 05 2017 :  07:41:22 AM  Show Profile  Reply with Quote
We use an override macro that inserts override if available and otherwise it does nothing. Code inspection doesn't pick this up. Is there something I can do that code inspection is aware of that macro?

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Oct 05 2017 :  08:40:20 AM  Show Profile  Reply with Quote
Do you mean that Code Inspection is suggesting that override should be added, even though the macro is present?

Is the header file that declares this override macro directly included in the files where Code Inspection is suggesting override? If the header file is directly included, then Code Inspection should be able to expand and understand the macro. But if the macro declaration is not directly included then Code Inspection probably won't find it, so it won't consider it.

Alternatively, you can turn off this Code Inspection check, with the option:

VA Options -> Code Inspection (beta) -> Overriding function without 'override' specifier

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

fibbo_ch
New Member

Switzerland
2 Posts

Posted - Oct 05 2017 :  09:47:06 AM  Show Profile  Reply with Quote
Unfortunately it's not directly included. What prevents code inspection of finding the macro? Because using GoTo on the macro finds the definition.

Anyway, thanks for your quick reply.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Oct 05 2017 :  1:22:57 PM  Show Profile  Reply with Quote
Sorry, I didn't explain this very well at all.

Code Inspection parses just the current file, but it has access to the include directory settings in the solution, so it will be able to resolve #include lines.

The main limitation just parsing the current file encounters is when Code Inspection is parsing a header file, since some header files don't have any #include statements, relying on the cpp file they are included in to sort out all of the headers they are dependent upon.

Are you seeing this problem in a .h or .cpp file? Just looking at the single file, with it's #include statements, should Code Inspection be able to locate the macro definition?

Alt-g uses VA's symbol database of the entire solution, so has access to a different set of information to Code Inspection.

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

Zadrim
New Member

USA
8 Posts

Posted - Oct 05 2017 :  2:54:59 PM  Show Profile  Reply with Quote
I believe this may be the same or similar issue to what I am encountering in a forum post (Code Inspection - Out of Source Headers) I created recently.

My guess is this because an issue after the 2235 update.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Oct 05 2017 :  3:35:08 PM  Show Profile  Reply with Quote
Macros are a common factor here, but I don't see why macros are suddenly causing problems. For this thread, working out if code inspection should be able to find the macro definition is a good first step.

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