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

 All Forums
 Visual Assist
 Technical Support
 Highlight references not coloring correctly?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Tomato Guru

102 Posts

Posted - Jun 03 2008 :  5:14:37 PM  Show Profile  Reply with Quote
Since I upgraded to 1638 (and now 1640), highlight references is not distinguishing between lhs and rhs contexts. All references are being marked in light cyan.

VA_X.dll file version 10.4.1640.0 built 2008.05.22
DevEnv.exe version 9.0.21022.8
msenv.dll version 9.0.21022.8
Font: Consolas 15(Pixels)
Comctl32.dll version 6.10.6001.18000
Windows Vista 6.0 Build 6001 Service Pack 1
2 processors

Platform: Custom
Stable Includes:

Other Includes:

Stable Source Directories:

Tomato Guru

102 Posts

Posted - Jun 04 2008 :  09:51:31 AM  Show Profile  Reply with Quote
I'm not so sure anymore that this is a new issue. It may have to do with the kind of variable.

This works:

int i, j;
i = 1;
j = i;

This has problems

class Array {
operator [] ....

Array i;
int j;
i[0] = 1;
j = i[0];

If one highlights references for i, for the case i[0] = 1, the i is highlighted in LightCyan.

Go to Top of Page

Whole Tomato Software

United Kingdom
17110 Posts

Posted - Jun 04 2008 :  11:47:46 AM  Show Profile  Reply with Quote
For ease I have turned this into the following test code:

static void testGeneralCode()
	int nLocalOne, nLocalTwo;
	nLocalOne = 1;
	nLocalTwo = nLocalOne;

	std::vector<int> vecLocal;
	int nLocalThree;
	vecLocal[0] = 1;
	nLocalThree = vecLocal[0];

I see the same problem when doing a Find References on vecLocal. I see the same behaviour in both VA 1626 and VA 1640.

In this specific case it is clear that vecLocal is being modified when it is assigned to. But in general, for "a function is being called on the LHS of equals" is the class instance the function is being called on actually being modified?

I don't think this is a new "problem". It is possible to argue that it is not even a problem at all, although I agree that it would probably be best if VA highlighted vecLocal as modified in this general situation


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

Tomato Guru

102 Posts

Posted - Jun 04 2008 :  2:02:39 PM  Show Profile  Reply with Quote
Feline, thank-you for your excellent follow-up on my skeleton code.

I would suggest that by definition, operator = is an assignment operator, and that quantities on the left hand side should be highlighted as being assigned to, provided that they resolve to an intrinsic type, or an object - i.e. as opposed to a function or function argument.
Go to Top of Page

Tomato Guru

102 Posts

Posted - Jun 05 2008 :  11:15:20 AM  Show Profile  Reply with Quote
Having thought about this a little more, it would also be useful to distinguish between function declaration/definition, and function usage. E.g.

class Base {
virtual void aFn() { default implementation; }

class Derived : public Base {
virtual void aFn();
void bFn();

void Derived::aFn() { specific implementation; }

void Derived::bFn() {

Derived anObj;
void gblFn() {

The calls to aFn would be cyan and the declaration/definition rose.
Go to Top of Page

Whole Tomato Software

United Kingdom
3277 Posts

Posted - Jun 05 2008 :  5:07:00 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

Go to Top of Page

Whole Tomato Software

5566 Posts

Posted - Jan 31 2010 :  1:39:16 PM  Show Profile  Reply with Quote
case=4442 is fixed in build 1810

Whole Tomato Software, Inc.
Go to Top of Page

New Member

3 Posts

Posted - Jul 22 2015 :  10:30:27 PM  Show Profile  Reply with Quote
Originally posted by support

case=4442 is fixed in build 1810

It seemed that the current build 2068 has the same color problem again.

E.g. If you search for all references of array a, the assignment is highlighted in LightCyan and not MistyRose.

int _tmain(int argc, _TCHAR* argv[])
int a[2] = {};
a[0] = 1;
int b = a[0];

return 0;

Go to Top of Page

Whole Tomato Software

2817 Posts

Posted - Feb 21 2018 :  5:50:15 PM  Show Profile  Reply with Quote
case=4985 is fixed in build 2258
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000