Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT rename refactoring breaks the code
CDT rename refactoring breaks the code [message #1016501] Wed, 06 March 2013 17:01
Nobody Mising name is currently offline Nobody Mising nameFriend
Messages: 75
Registered: July 2010
Member
CDT breaks the code when rename refactoring is performed on simple code like this:
#define call_func(x) x.func();

template <typename T>
void call_func_templ(T t) { t.func(); }

struct A {
  void func() {}  // <== rename this function
};

struct B {
  void func() {}
};

int main()
{
  A a;
  B b;
  call_func(a);
  call_func(b);
  call_func_templ(a);
  call_func_templ(b);
}

Renames only A::func itself, certainly the code doesn't even compiles after such "rename".

Expected behavior: renamed A::func, B::func and inside macro and template function. Or at least show some warning that rename is too complex for CDT and something can break but not just silently do incorrect refactoring.

Can something be done about this problem?
Previous Topic:Newbie; Can't create a new C++ project
Next Topic:How to link ogre3D sdk to my project
Goto Forum:
  


Current Time: Tue Apr 16 07:44:07 GMT 2024

Powered by FUDForum. Page generated in 0.05613 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top