Bug 360795 - Rename refactoring on struct fields renames different struct fields too
Summary: Rename refactoring on struct fields renames different struct fields too
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: 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: 2011-10-13 07:20 EDT by Jussi Pakkanen CLA
Modified: 2022-05-19 10:34 EDT (History)
4 users (show)

See Also:


Attachments
Minimal project to verify the problem (1.98 KB, application/x-zip-compressed)
2013-04-24 16:30 EDT, Jesse Weinstein CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jussi Pakkanen CLA 2011-10-13 07:20:52 EDT
Create a new project with a C file with the following contents:

typedef struct {
    int x;
    int y;
} point;

typedef struct {
    double x;
    double y;
} fpoint;

void reset_point(point *p) {
    p->x = 0;
    p->y = 0;
}

void reset_fpoint(fpoint *p) {
    p->x = 0.0;
    p->y = 0.0;
}

Then refactor->rename the first struct's x field to something else. Note that in the live preview, only function reset_point is modified. But when you press enter, CDT renames the x field in struct fpoint as well. It should not touch it at all.
Comment 1 Jesse Weinstein CLA 2013-04-24 16:30:20 EDT
Created attachment 230094 [details]
Minimal project to verify the problem

Verified with eclipse-SDK-4.3M5a-win32-x86_64.