Is there a working C++ refactoring tool?

RED SOFT ADAIR picture RED SOFT ADAIR · Sep 7, 2009 · Viewed 52.7k times · Source

Does anybody know a fully featured refactoring tool for C++ that works reliably with large code bases (some 100.000 lines)?

I tried whatever i can find again and again over the last years: SlickEdit, Eclipse CDT. They all were not at all usable.

SUMMARY: I took time and evaluated "Visual Assist X" as well as "Refactor for C++". Both have some impressing features, but both as well are far from perfect. Extracting a large block of code usually is not done satisfying without manual modifications - and therefore does not pay off.

"Visual Assist X" has nice features such as much more complete autocompletition etc. But it leads to so much flickering and slows down much at certain points.

By my opinion therefore the answer is: "No, there is no production ready refactoring tool for C++"

UPDATE March 2015 As for hdoghmens reply today i tried Resharper for C++. His link https://www.jetbrains.com/resharper/ does not say anything about C++. But i found Resharper C++ that was announced more than a year ago here:

https://www.jetbrains.com/resharper/features/cpp.html

I gave it a try with VC2010 using a code base of 20MB.

Test 1: Extract Method: results in a Resharper exception. No source code changed.

Test 2: Extract Method with different source: Works fine

Test 3: Change signature of extracted function: Results in broken C++ code:

bool myclass::do_work123(<unknown long Color>int& Filled*&, long, int&)

Maybe thats why C++ its not listed on the main page.

By my opinion the answer to this question still is "NO".

Answer

Tom Leys picture Tom Leys · Sep 7, 2009

Visual Assist and Visual Studio make dealing with large codebases much easier. Visual assist is good at tracking down how a class or member is used and is more effective at renaming it without false positives than search and replace.