Community
Participate
Working Groups
Build Identifier: 201012031515 For the following code from the open source project cgreen: #define expect(f, ...) expect_(get_test_reporter(), #f, __FILE__, __LINE__, (Constraint *)__VA_ARGS__ +0, (Constraint *)0) void expect_(TestReporter *test_reporter, const char *function, const char *test_file, int test_line, ...); #define where(parameter, constraint) where_(#parameter, constraint) Constraint *where_(const char *parameter, Constraint *constraint); Ensure(single_item_breadcrumb_does_calls_walker_only_once) { expect(mock_walker, where(name, is_equal_to_string("Hello"))); } Renaming the macro where() on the first line does not correctly update the name in the expect() statement on the next to last line. Reproducible: Always Steps to Reproduce: 1. unpack the attached tarball and add it to a new C++ project 2. opens mocks.h 3. select the where() macro delcaration and press alt+shift+R 4. change the name to when() and press Enter result: compilation will fail because the instances of where() in breadcrumb_tests.c and a few other places are not correctly renamed. expected result: rename refactoring should correctly update all instances of the symbol name so that compilation and behaviour of the code continues without a problem.
Created attachment 184909 [details] tarball of the source tree that reproduces this bug, from the open source project "cgreen"
It's worth noting that if I go iunto breadcrumb_tests.c, and select the instance of when() that wasn't renamed correctly, and then press alt+shift+R, CDT *does* correctly rename all the instances in the file.
Verified this problem is still present in build ID 201105160958.
Verified this problem still exists in build id 201105160958.
still happening in Version: 8.2.0.201302052218