Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332256 - renaming a function doesn't change that function's name in a macro definition
Summary: renaming a function doesn't change that function's name in a macro definition
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Sergey Prigogin CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-09 17:06 EST by Matt Hargett CLA
Modified: 2013-04-24 13:19 EDT (History)
4 users (show)

See Also:


Attachments
tarball of the source tree that reprocued this bug, from the open source project "cgreen" (244.91 KB, application/x-bzip)
2010-12-09 17:08 EST, Matt Hargett CLA
no flags Details
Minimal project to verify the problem (1.92 KB, application/x-zip-compressed)
2013-04-23 16:25 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 Matt Hargett CLA 2010-12-09 17:06:41 EST
Build Identifier: 201012031515

For this code:

#define where(parameter, constraint) where_(#parameter, constraint)
Constraint *where_(const char *parameter, Constraint *constraint);

Renaming where_() doesn't change the usage of where_() in the macro definition. (It's also worth mentioning that I can't even rename where_() inside the macro definition, but that's a different bug.)



Reproducible: Always

Steps to Reproduce:
-unpack the attached source tarball
-add the directory to a C++ project
-open the file mocks.h
-select the where_ on the second line
-press alt+shift+R
-change name to when_, and press Enter

result:
it doesn't rename the instance of where_ in the macro definition on the first line

expected result:
should rename instances of that function name in macro definitions, as well as elsewhere.
Comment 1 Matt Hargett CLA 2010-12-09 17:08:11 EST
Created attachment 184908 [details]
tarball of the source tree that reprocued this bug, from the open source project "cgreen"
Comment 2 Jesse Weinstein CLA 2013-04-23 16:25:07 EDT
Created attachment 230050 [details]
Minimal project to verify the problem

On eclipse-SDK-4.3M5a-win32-x86_64

With this minimal test case: 

#define test(a,b) foo(#a, b)
void foo(const char *s,int b) {}

Running the Rename refactoring from the dialog box, with the "Macro definitions" checkbox checked, it works (i.e. I am unable to reproduce the bug).

I suggest this be closed as FIXED (or WORKSFORME).
Comment 3 Sergey Prigogin CLA 2013-04-23 20:51:01 EDT
Matt, please reopen if you can reproduce the problem with "Macro definitions" checkbox checked.