Bug 482953 - Renaming a parameter variable of a function declaration, renames local variables of other functions.
Summary: Renaming a parameter variable of a function declaration, renames local variab...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 8.8.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-24 15:53 EST by Gunjan Aggarwal CLA
Modified: 2020-09-04 15:21 EDT (History)
1 user (show)

See Also:


Attachments
renaming parameter. (8.98 KB, image/png)
2015-11-24 15:53 EST, Gunjan Aggarwal CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gunjan Aggarwal CLA 2015-11-24 15:53:59 EST
Created attachment 258257 [details]
renaming parameter.

Consider a simple fact.c file with following contents:

int factorial(int n) {
 int result = 1;
        for (i=1 ; i <= n; i++) {
                result *= i;
         }
        return result;
}

int factorial1(int n);

In this example when try to search references of "n" in declaration: "int factorial1(int n);", I get zero matches. Then when I try to rename this "n", the box is placed only around "n" in the declaration(See attachment: renaming1.png )

But on clicking enter the content to above file changes to following:

int factorial(int nn) {

 int result = 1;
        for (i=1 ;       i <= nn; i++) {
                result *= i;
         }
        return result;
}

int factorial1(int nn);

But I don't want rename the variable "n" in function factorial.