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
 Renaming scoped class selects unrelated identifier
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

legalize
Tomato Guru

USA
119 Posts

Posted - Jun 22 2014 :  1:41:32 PM  Show Profile  Reply with Quote
Test suite: http://d3dgraphicspipeline.codeplex.com/releases/view/39824

Test case R7

Renaming class X::Rename1 causes instances of ::Rename1 to be selected, generating invalid code.

http://legalizeadulthood.wordpress.com

feline
Whole Tomato Software

United Kingdom
19008 Posts

Posted - Jul 15 2014 :  10:05:44 PM  Show Profile  Reply with Quote
I don't understand what you mean here. I cannot find the "::Rename1" in the test suite that is supposed to be being updated. I have checked the link, and it says the project has not been updated since 2010, so I should have the correct version.

Trying to guess what you are describing, I have tested with the following code in a .cpp file:

class testClassDuplicateName
{
public:
	static void useGlobalClass()	{ }
};

namespace testSpaceHoldingDuplicate
{
	class testClassDuplicateName
	{
		void useSpaceClass()	{ }
	};

	void testCallingGlobalClass()
	{
		::testClassDuplicateName::useGlobalClass();
	}
}

and so far I am not seeing any obvious problems. This code compiles quite happily, and has more distinct names to avoid any accidental problems with duplicate names.

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

legalize
Tomato Guru

USA
119 Posts

Posted - Jul 16 2014 :  11:01:08 AM  Show Profile  Reply with Quote
In the linked test suite, file Rename.cpp, ::Rename1 is located between lines 24 and 45. X::Rename1 is located between lines 56 and 77. Test case R7 is on line 55.

However, I am unable to reproduce the issue right now in VS2012.

http://legalizeadulthood.wordpress.com
Go to Top of Page

legalize
Tomato Guru

USA
119 Posts

Posted - Jul 16 2014 :  11:10:06 AM  Show Profile  Reply with Quote
Ah, I see the problem now. Instances of ::Rename1 are selected for renaming where they are used later in the file.




http://legalizeadulthood.wordpress.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19008 Posts

Posted - Jul 17 2014 :  12:22:49 AM  Show Profile  Reply with Quote
I am seeing the same effect here, now I know what I am looking for:

case=27398

zen is the art of being at one with the two'ness
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