| Summary: | Template method rename isn't working | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Dmitry Matveev <dmitriy.g.matveev> |
| Component: | cdt-refactoring | Assignee: | Project Inbox <cdt-refactoring-inbox> |
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | normal | ||
| Priority: | P3 | CC: | eostroukhov, malaperle, yevshif |
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
This is similar to bug 316567. The general pattern is that when renaming an entity its specializations are not handled. |
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".