Clang-based Refactoring, or How to Refactor Millions of Line of Code Without Alienating your Colleagues
At first look, Clang-Tidy looks like a convenient static analysis tool. But it is actually the emerged part of an incredible iceberg that can change the way software developers work on big projects. Using the extension API provided by clang tooling, you can design custom tools that will allow you to get rid of bad patterns or API mistakes in your code that were historically considered "too deep-rooted to fix". Through concrete examples we will see what these custom tools can do and how this could impact your everyday job as software maintainers. But wielding such powerful tools can be hard! And working on big projects also means you are likely working in an ecosystem with a lot of other developers. What happens when each time these colleagues try to sync their repository they find out one of your refactorings completely changed the API they were calling in their local work? We will see the difficulties and pitfalls one can encounter when developing and using clang based refactoring tools and how to avoid or reduce them.
Fred Tingaud is a Principal Software Engineer at Murex where he maintains the C++ UI and front-end APIs.
He is also the creator of quick-bench.com and the organizer of CPPP conference.
His interests range from code efficiency and readability to UI ergonomics.