Bug 425431 - Renaming variable to a keyword, leading to a compilation error
Summary: Renaming variable to a keyword, leading to a compilation error
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: Next   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-10 12:29 EST by Gustavo Wagner CLA
Modified: 2020-09-04 15:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Wagner CLA 2014-01-10 12:29:37 EST
Eclipse IDE for C/C++ Developers
Version: Kepler Service Release 1
Build id: 20130919-0819


Reproducing the bug:


Consider the following code:
======== Original Version ========
int main(int a, char** argv) {
    int b =1; // Variable to be renamed
    return 0;
}
==================================

The refactoring tool is allowing to rename the variable "b" to a invalid identifier (in following case, the keyword "int"):

========== Refactored ===========
int main(int a, char** argv) {
    int int =1; // Invalid rename
    return 0;
}
=================================


Thanks in advance.