Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Code inspection - override macro

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
fibbo_ch Posted - Oct 05 2017 : 07:41:22 AM
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?
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 05 2017 : 3:35:08 PM
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.
Zadrim Posted - Oct 05 2017 : 2:54:59 PM
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.

feline Posted - Oct 05 2017 : 1:22:57 PM
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.
fibbo_ch Posted - Oct 05 2017 : 09:47:06 AM
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.
feline Posted - Oct 05 2017 : 08:40:20 AM
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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000