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
 1619: type coloring when using with cv in < >
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

.oisyn
Tomato Guru

162 Posts

Posted - Nov 26 2007 :  5:57:44 PM  Show Profile  Reply with Quote
First I'd like to suggest to increase the number of characters in the topictitle, because I'm always having difficulties expressing the problem

The problem is, whenever you use a cv-qualified typedef-id as a template argument or cast destination (that is, whenever it is expressed between angle brackets), VA X decides to color ALL uses of that type in that sourcefile as if it where a variable. This only applies to typedef identifiers, not to the actual user defined types like class names. And also only if you put the cv-qualifiers in front of the type.

struct MyType { };
MyType * ptr = static_cast<MyType*>(0);
const MyType * ptr = static_cast<const MyType*>(0);

typedef MyType MyAlias;
MyAlias * ptr = static_cast<MyAlias*>(0);
const MyAlias * ptr = static_cast<MyAlias const*>(0);
const MyAlias * ptr = static_cast<const MyAlias*>(0); // culprit


The last line makes all occurences of 'MyAlias' be colored like variables. If you remove that last line, it is colored like a type as it should. When using a type directly instead of through a typedef, like in the MyType example, all is fine.

Naturally it also applies when you use volatile or const volatile.

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Nov 27 2007 :  09:09:01 AM  Show Profile  Reply with Quote
I thought I recognised this. I believe this is:

case=2352

turning up in a slightly different context.

zen is the art of being at one with the two'ness
Go to Top of Page

.oisyn
Tomato Guru

162 Posts

Posted - Jun 03 2008 :  06:47:46 AM  Show Profile  Reply with Quote
This is a friendly reminder that I'm still seeing this in build 1640
However, it doesn't seem to be limited to typedefs anymore - it now applies to direct types as well, which is pretty annoying as const types between angle brackets (for casting and template parameters) are pretty common.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jun 03 2008 :  09:14:47 AM  Show Profile  Reply with Quote
If this is getting worse then that is definitely a problem. What sort of code are you seeing a problem with? I have just tried this simple example:

class CTestClassInAngleBrackets { };

static void testGeneralCode()
{
	std::vector<const CTestClassInAngleBrackets *> testVec;
}


and for me the colouring is correct.

zen is the art of being at one with the two'ness
Go to Top of Page

.oisyn
Tomato Guru

162 Posts

Posted - Jun 05 2008 :  07:16:54 AM  Show Profile  Reply with Quote
Move that class definition to a header and you'll notice the bug . Also, it applies to incomplete types in the same sourcefile (if you remove the braces behind the definition of CTestClassInAngleBrackets you'll see the bug appear as well)

Edited by - .oisyn on Jun 05 2008 07:17:21 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jun 05 2008 :  11:23:09 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description. I have put in a new bug for this regression:

case=17359

And I have increased the priority on case=2352 for you which will hopefully help. It is possible the fix for case=17359 will fix both problems, but I really don't know if it will or not.

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jul 14 2008 :  2:52:05 PM  Show Profile  Reply with Quote
case=2352 is fixed in build 1645
case=17359 is fixed in build 1645

Whole Tomato Software, Inc.
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