Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316567

Summary: rename feature does not work for class member in template base class.
Product: [Tools] CDT Reporter: Vasiliy Dybala <dibalavs>
Component: cdt-refactoringAssignee: Project Inbox <cdt-refactoring-inbox>
Status: CLOSED DUPLICATE QA Contact: Sergey Prigogin <eclipse.sprigogin>
Severity: normal    
Priority: P3 CC: eostroukhov, Jesse.Weinstein, malaperle, tomga, yevshif
Version: 7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Minimal project to verify the problem none

Description Vasiliy Dybala CLA 2010-06-11 01:54:36 EDT
1. create 2 files:
test.h -----------------
template <class T>
class Base
{
public:
  void func(){};
};

class D1 : public Base<int> {};

class D2 : public Base<char> {};

void test()
{
  D1 d;
  d.func();

  D2 dd;
  dd.func();
}
------------------------

test.cpp --------------
#include "test.h"
------------------------

2. select void func(){}; and rename function name to new_func.
3. eclipse does not rename d.func(); and dd.func();

CDT Version: 7.0.0.201006041510
-- Configuration Details --
Product: Eclipse 1.3.0.20091112-2040 (org.eclipse.epp.package.cpp.product)
Installed Features:
 org.eclipse.platform 3.6.0.v20100121-9hF71GITFufnsj44XsigdRiv20ClbUb3ou
Comment 1 Jesse Weinstein CLA 2013-04-22 15:21:30 EDT
Created attachment 229988 [details]
Minimal project to verify the problem

Verified on eclipse-SDK-4.3M5a-win32-x86_64. Here's a minimal project that demonstrates the problem. Interestingly, the changes show up in the live-preview, but are reverted in the actual change.
Comment 2 Jesse Weinstein CLA 2013-04-22 18:19:59 EDT
This appears to be the same problem as bug 240692. I've traced it down to the same  failure in ASTManager.isSameBinding(). The bug should probably be closed as a duplicate.
Comment 3 Marc-André Laperle CLA 2013-04-22 23:15:18 EDT

*** This bug has been marked as a duplicate of bug 240692 ***