Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Code checking problem

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
Paltr Posted - Jul 08 2009 : 11:09:17 PM
Hi! There is a problem with class body code checking (VA marks almost all the code inside the class as incorrect one) when class' head is generated by macros.
I prepared small example demonstrating this bug, it can be downloaded at http://up-file.com/download/1d28651d87be998b7158109677193f12e . This bug can be seeing in file test.cpp line 37. If it doesn't reproduced try to make some small change (insert space for example) and save the project.
6   L A T E S T    R E P L I E S    (Newest First)
Paltr Posted - Jul 13 2009 : 10:38:46 PM
Hmmm... I added these two lines, and now it seems to be working (I don't know what I did wrong the last time I added them)... Thanks a lot for your help!
feline Posted - Jul 13 2009 : 3:40:27 PM
I am confused. Returning to your sample project I have now added these two lines to VA's StdAfx.h file:

#define INTERFACE_MIXIN(INTERFACE_MIXIN, DEFAULT_IMPL_MIXIN) template<class TBase> class INTERFACE_MIXIN
#define IMPL_MIXIN(MIXIN_CLASS, INTERFACE_MIXIN, REQUIRED_EXTENSIONS) template<class TBase> class MIXIN_CLASS

and after a symbol database rebuild none of the classes in "test.cpp" are being underlined by VA as mistyped symbols.

If you have lots of classes using the same two or three macro's then we just need to find a suitable work around for the macros and this should fix all of the classes in one go.

If you have a large number of macros then I can see how this would be more of a problem.
Paltr Posted - Jul 12 2009 : 04:05:15 AM
"Get content from default Intellisense" didn't help...
I mean classes. They work as mixines here(http://en.wikipedia.org/wiki/Mixin).
feline Posted - Jul 11 2009 : 4:17:19 PM
Does turning on:

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

help at all? This might help with listboxes on these macro generated classes, or it might make it worse.

When you say "I have many such classes that are used to generate more complex ones" do you mean classes or macros?

If there are a lot of macros that are causing problems, then I wonder if there is a common element to the macro's that we can try and help VA with.
Paltr Posted - Jul 09 2009 : 1:39:53 PM
Thanks for advice. But the problem is that I have many such classes that are used to generate more complex ones in compile - time. And all of them are marked as invalid. This make the work harder. If you will watch the macros implementation they are rather simple - they consist from some templates specializations at the top of definition and then follows something like "template<class TBase> class INTERFACE_MIXIN" that is easy to parse (IMHO).
feline Posted - Jul 09 2009 : 12:59:40 PM
I have the files, thank you for these. I am seeing the same problem here. You are using some very complex macro's, it is no wonder that VA is getting confused.

As an initial work around I have edited VA's "StdAfx.h" file as explained in this FAQ entry:

http://docs.wholetomato.com?W302

and add the entry:

#define INTERFACE_MIXIN(INTERFACE_MIXIN, DEFAULT_IMPL_MIXIN) template<class TBase> class INTERFACE_MIXIN


at the bottom. This file is used to help VA's parser with difficult code, and can be used to work around odd effects. After modifying this file you need to rebuild the VA symbol database for the changes to take effect:

VA Options -> Performance -> General -> Rebuild symbol databases

This fixes the underlining in the first problem class in "test.cpp" but not the second problem class, since that uses a separate macro.

I am not sure if this work around will do quite what you need, but it is a good start. I have not tried to work through all of the macro's to work out exactly what is happening here.

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