CDT rename refactoring breaks the code [message #1016501] |
Wed, 06 March 2013 17:01 |
Nobody Mising name 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?
|
|
|
Powered by
FUDForum. Page generated in 0.02276 seconds