Author |
Topic |
|
fibbo_ch
New Member
Switzerland
2 Posts |
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? |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
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
|
zen is the art of being at one with the two'ness |
|
|
fibbo_ch
New Member
Switzerland
2 Posts |
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
Whole Tomato Software
United Kingdom
19021 Posts |
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. |
zen is the art of being at one with the two'ness |
|
|
Zadrim
New Member
USA
8 Posts |
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
Whole Tomato Software
United Kingdom
19021 Posts |
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. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|