Bug 320063 - Template method rename isn't working
Summary: Template method rename isn't working
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-16 00:38 EDT by Dmitry Matveev CLA
Modified: 2020-09-04 15:19 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Matveev CLA 2010-07-16 00:38:42 EDT
Build Identifier: I20100608-0911

template<class T> void methodWithTemplateArg(T arg);

static void testTemplateArg()
{
	methodWithTemplateArg(true);
	methodWithTemplateArg(1);
	methodWithTemplateArg(1L);
	methodWithTemplateArg(1.0);
}

For above code "Rename refactoring" isn't working well. If I will place cursor on any "methodWithTemplateArg" token all 5 tokens will be highlighted, I also can ctrl-click any of these tokens to go to declaration of function, but if I will call "Rename refactoring" from any of these tokens only selected token will be renamed.

Reproducible: Always

Steps to Reproduce:
1. Paste test code to empty file and save it.
2. Place cursor on any "methodWithTemplateArg" token and call "Rename refactoring"
3. Change the value in the "Rename to:" textbox.
4. Press "Preview" or "OK" button.

The refactoring should affect all of "methodWithTemplateArg" tokens, but it only affects the one selected before call to "Rename refactoring".
Comment 1 Markus Schorn CLA 2010-07-20 05:16:16 EDT
This is similar to bug 316567. The general pattern is that when renaming an entity its specializations are not handled.