Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Find references fails in a designated initializer

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
mvolkar Posted - Aug 27 2018 : 4:19:17 PM
C99 allows you to initialize individual fields of a structure using a designated initializer list as follows (example stolen from another forum post):

struct Person
{
	int height;
	int weight;
	int age;
};

int main()
{
	struct Person p = { .age = 18 };
}


What I have found is that if I select one of the identifiers in the initializer list (e.g., age in this case) and try to use the Find References feature of Visual Assist, it tells me that the symbol is unrecognized. The interesting part of this is that Goto Implementation is able to find the field in the struct definition, and Find References works from there. This seems to indicate to me that Visual Assist knows something about the identifier, but isn't properly handling it for Find References. This is obviously a minor annoyance, but I still wanted to report it. I am using Visual Assist build 2283.1 and Visual Studio 2015.
6   L A T E S T    R E P L I E S    (Newest First)
mvolkar Posted - Feb 21 2020 : 08:24:26 AM
I can confirm that this appears to have addressed the problem I was seeing. Thank you.
sean Posted - Feb 20 2020 : 11:04:22 PM
case=141667 is fixed in build 2366.
https://support.wholetomato.com/default.asp?W404#2366
sean Posted - Dec 20 2019 : 3:36:56 PM
Sorry about that but thanks for the update. I've opened case=141667 to have it looked into.
mvolkar Posted - Dec 20 2019 : 3:16:15 PM
Thank you for the update, I downloaded the new build and can confirm that it solves this problem in the case I originally reported. I did note, however, that there was a case in our code that still didn't seem to work correctly. Looking closer, this case is initializing an array of structs using the designated initializer method.

So to expand my previous example, the following code exhibits the same problem behavior:
struct Person
{
	int height;
	int weight;
	int age;
};

int main()
{
	struct Person p[3] =
	{
		{ .age = 18 },
		{ .age = 37 },
		{ .age = 5 }
	};
}
sean Posted - Dec 20 2019 : 2:27:21 PM
case=118748 is implemented in build 2358.
https://support.wholetomato.com/default.asp?W404
http://builds.wholetomato.com/binaries/VA_X_Setup2358_0.exe
feline Posted - Aug 28 2018 : 07:04:01 AM
I am seeing the same effect here, thank you for the clear description:

case=118748

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