Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Some problems involving macros
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

space_cowboy
New Member

8 Posts

Posted - Dec 15 2008 :  07:55:25 AM  Show Profile  Reply with Quote
Hi all !

I have read some of the topics involving the problems with macro parsing in this forum, but i am not sure if my problems fit in there. Frist off, some code:


#include <sstream>
#include <iostream>

void someMethod()
{
	std::stringstream foo;
	foo.str();
}

int main(int argc, char* argv[])
{
	someMethod();
	std::stringstream foo;
	foo.str();

	return 0;
}


This is makes no sense, it's just to recreate the problems, and there are several. I use VS2005 with VAX Build 1649 and no further Addons. I have enabled deep macro parsing (http://docs.wholetomato.com?W363&SearchTerms=macro,parsing).

1. VAX does not recognize the member str() of std::stringstream. It shows it in the VA View, but not in the suggestions box and it is underlined as bad symbol.

2. Now if i do this (wich should not change anything):

#define bar someMethod

void bar()

It recognizes the function. But now it offers me different refactorings on the local variable foo in someMethod. Before i could only choose Rename. Now i can also choose Add similar member and encapsulate field, wich produces:

void bar()
{
	std::stringstream foo;
	std::stringstream Foo() const { return foo; }
	void Foo(std::stringstream val) { foo = val; }
	foo.str();
}

This is rather not the intention. I hope this was understandable.

wbr

space_cowboy

P.S.: I just found out about the copy info button:
VA_X.dll file version 10.4.1649.0 built 2008.09.09
Licensed to:
VA X: [email protected] (10-user license) Support ends 2009.12.05
DevEnv.exe version 8.0.50727.762
msenv.dll version 8.0.50727.762
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.2900.5512
Windows XP 5.1 Build 2600 Service Pack 3
2 processors

Platform: Custom
Stable Includes:
C:\\Programme\\Microsoft Visual Studio 8\\VC\\include;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\atlmfc\\include;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include;
C:\\Programme\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;
C:\\Programme\\Microsoft DirectX SDK (August 2007)\\Include;
C:\\Programme\\Intel\\IPP\\5.3.4.087\\ia32\\include;
C:\\Programme\\Microsoft SDKs\\Windows\\v6.1\\Include;

Other Includes:

Stable Source Directories:
C:\\Programme\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl;
C:\\Programme\\Microsoft Visual Studio 8\\VC\\crt\\src;


Edited by - space_cowboy on Dec 15 2008 09:24:53 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 15 2008 :  5:06:31 PM  Show Profile  Reply with Quote
I am seeing the same effect with "str". Thank you for the clear description.

case=21799

Point 2: I have put in a bug report for this:

case=21802

Visual Assist offered wrong refactorings here.

Edited by - accord on Dec 20 2008 12:31:25 PM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000