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

Bug 360795

Summary: Rename refactoring on struct fields renames different struct fields too
Product: [Tools] CDT Reporter: Jussi Pakkanen <jpakkane>
Component: cdt-refactoringAssignee: Project Inbox <cdt-refactoring-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, Jesse.Weinstein, lcmarincek, yevshif
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Minimal project to verify the problem none

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.