Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Problem with macro-parsing

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
wellental1 Posted - Apr 05 2012 : 06:44:18 AM
Hello!
In our productive code, it seems like vax is parsing some macros the wrong way. especially this one drives me crazy:


flagenum.h
#define FLAG_ENUM(_N) \ enum _N; \ \ static _N operator|(_N a, _N b) { return (_N)( (int)a | (int)b ); } \ static _N operator|=(_N& a, _N b) { return a = a | b; } \ static _N operator&(_N a, _N b) { return (_N)( (int)a & (int)b ); } \ static _N operator&=(_N& a, _N b) { return a = a & b; } \ static _N operator^(_N a, _N b) { return (_N)( (int)a ^ (int)b ); } \ static _N operator^=(_N& a, _N b) { return a = a ^ b; } \ static _N operator>>(_N a, int b) { return (_N)( (int)a >> b ); } \ static _N operator>>=(_N& a, int b) { return a = a >> b; } \ static _N operator<<(_N a, int b) { return (_N)( (int)a << b ); } \ static _N operator<<=(_N& a, int b) { return a = a << b; } \ static _N operator~(_N a) { return (_N)( ~(int)a ); } \ enum _N



If i define a flag-enum (vgd_freedomdegrees.h below) and use it the way, shown in somefile.cpp below, it is being colored correctly within the editor, but code-completion doesn't provide anything after typing :: behind the flag-enum's name. "Add include" from the refactor-menu doesn't work, also.



vgd_freedomdegrees.h
#include <flagenum.h>
#pragma warning(disable:4482)

FLAG_ENUM( VGD_FreedomDegrees )
{
VFD_MoveHorizontal = 1,
VFD_MoveVertical = 2,
VFD_ScaleHorizontal = 4,
VFD_ScaleVertical = 8,
VFD_Move = VFD_MoveHorizontal | VFD_MoveVertical,
VFD_Scale = VFD_ScaleHorizontal | VFD_ScaleVertical,
VFD_All = VFD_Move | VFD_Scale
};


somefile.cpp
VGD_FreedomDegrees JOB_VisualTaskObject::GetFreedomDegrees() const
{
return VGD_FreedomDegrees::VFD_Move | VGD_FreedomDegrees::VFD_ScaleHorizontal;
}



I already tried setting the LimitMacroParsing and LimitMacro registry-keys, rebuilt the symbol-database, but it didn't resolve the problem. Is there any other setting, i could try?

thx in advance,

max
8   L A T E S T    R E P L I E S    (Newest First)
wellental1 Posted - Apr 17 2012 : 05:52:03 AM
Hey Jean!
Perfect! That solved the problem!
thx,
max
sean Posted - Apr 16 2012 : 1:57:20 PM
A workaround is to ensure that flagenum.h ends with a blank line and then forcing a reparse (VAssistX | Tools | Reparse Current File) of the files that include it.
accord Posted - Apr 11 2012 : 8:18:08 PM
Almost forgot: turning on the following should help as a workaround:

VA Options -> Listboxes -> Get content from default intellisense
accord Posted - Apr 11 2012 : 7:50:37 PM
I got the project and was able to reproduce the problem, thank you. I have put in a bug report for this:

case=66081
wellental1 Posted - Apr 11 2012 : 07:46:51 AM
hi accord!
the case-id is: 66058.
cheers,
max
accord Posted - Apr 10 2012 : 2:03:29 PM
That would be helpful, thanks.
You can use the following form to send them in:
http://www.wholetomato.com/support/contact.asp

Please paste the URL of this topic into the description field so we can match it up.
wellental1 Posted - Apr 06 2012 : 5:23:01 PM
We are using VS2010SP1 VA1901. Made a blank console project, reset reg-keys, rebuilt symbol-database and cleared cache -> no effect...
The problem seems to be machine- and project-independent, as all my fellows here are experiencing the same problem.
If needed, i can send you a complete project-package containing all the files and project-settings, so you could try to reproduce it with this one.
cheers,
max
accord Posted - Apr 05 2012 : 6:46:28 PM
What Visual Studio and Visual Assist versions are you using?
I have picked 2 random combinations (VS2008 SP1 with VA1862 and VS11 beta with VA1903) and the listbox has worked for me in your example code:




The covered little tomatoes behind the listbox's icons mean that the list items are generated by VA, not Visual Studio.

Can you please try if you can reproduce the problem in a clean new win32 test project with the recursive macro parsing settings turned off? (so limiting macro parsing again, I was also using this default setting)

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