This event has ended. View the official site or create your own event → Check it out
This event has ended. Create your own
Please visit the C++Now website.
View analytic
Thursday, May 12 • 4:30pm - 5:15pm
Preprocessor-aware Automated Refactoring

Log in to save this to your schedule and see who's attending!

The arrival of C++11/14 and the emergence of sophisticated refactoring tools based on Clang have generated a lot of interest in using automated methods to update code to modern coding styles. One stumbling block has been the widespread use of preprocessor constructs to implement older idioms. Clang-based tools "see" the source AST after it has been preprocessed and then parsed, so they have a limited ability to refactor preprocessor-based (or interacting) idioms. Fortunately, we have some tools available that focus on the preprocessor step. The Boost.Wave library, introduced in 1.33, provides both a fully functional preprocessor and hooks for modifying generated output, or performing other actions, as it runs. Clang provides similar functionality with the pp-trace tool and PPCallbacks interface. The presenter will give an introduction to these two preprocessor tools and then demonstrate how each can be leveraged, in concert with Clang's AST rewriter, to modernize some popular preprocessor-based code idioms.

avatar for Jeff Trull

Jeff Trull

Trull Consulting
Electronic CAD algorithms | Modern C++ design patterns

Thursday May 12, 2016 4:30pm - 5:15pm
Booz Allen Hamilton

Attendees (29)