Explore an innovative approach to large-scale automated refactoring across translation unit boundaries in C++ in this conference talk from CppNow 2023. Delve into the challenges of refactoring thousands of structs across numerous files and learn how to propagate knowledge across translation units after edit generation. Follow the entire process from problem statement to the creation of AST-based code rewritings using Clang, simultaneous metadata generation, edit aggregation via Google Flume, analysis of proposed edits and metadata, and final patch generation. Gain insights into building a Clang refactoring tool and designing effective metadata for subsequent analysis. Discover practical lessons from applying this pipeline to real code, with a focus on converting an old macro library similar to BOOST_FUSION_DEFINE_STRUCT into a new mixin template library.
Overview
Syllabus
Large Scale Automated Refactoring Across Translation Unit Boundaries in C++ - Zie Weaver - CppNow 23
Taught by
CppNow