Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Small parser bug with c++

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
thalosii Posted - Mar 21 2023 : 09:17:35 AM
The c++ parser has issues with the following example. It ends up identifying class 'Bar' as 'SIMPLE_FINAL'.


    class SimpleInterface
    {
        virtual ~SimpleInterface() = default;
        virtual void Foo() = 0;
    };

    #define SIMPLE_FINAL final

    class Bar SIMPLE_FINAL : public SimpleInterface
    {
        void Foo() override {}
    };
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 21 2023 : 11:49:43 AM
I am seeing the same effect here. Thank you for the clear description.

case=102410

As a work around, can you please create a new text file called "va_stdafx.h" in the same directory as your SLN file. Edit this file and add the line:

#define SIMPLE_FINAL final

making sure that the file ends with a blank line.

When rebuilding its symbol database VA searches for this file, and if found, it parses it before parsing anything else. This file is used to give our parser helpful hints, and to work around odd problems that we encounter. The file should not be added to your solution, so it doesn't matter if the content of the file conflict with code inside your solution.

Having created and edited the file, in the IDE press the button:

VA Options -> Performance -> Rebuild symbol databases

and restart your IDE. This should fix this for you, it fixes it for me here.

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