Reader small image

You're reading from  Clang Compiler Frontend

Product typeBook
Published inMar 2024
PublisherPackt
ISBN-139781837630981
Edition1st Edition
Right arrow
Author (1)
Ivan Murashko
Ivan Murashko
author image
Ivan Murashko

Ivan V. Murashko is a C++ software engineer: He got his PhD from Peter the Great St.Petersburg Polytechnic University and has over 20 years of C++ programming experience; since 2020 he has worked with LLVM compilers. His area of interest includes clang compiler frontend and clang tools (clang-tidy, clangd).
Read more about Ivan Murashko

Right arrow

7.5 Summary

In this chapter, we investigated the different options provided by Clang for code modifications. We created a specialized Clang Tool that renames a method in a test class. We also rewrote the tool using Clang-Tidy and explored how custom AST matchers can be created. Furthermore, we delved into a variety of different classes provided by Clang for code modifications. One of these classes, clang::FixItHint, is integrated with the Clang diagnostics subsystem and provides a powerful tool for code modification within Clang, as well as in different tools created with Clang. We concluded with Clang-Format, the only tool in the book that does not use the AST but instead utilizes the Clang Lexer to perform code formatting. The next chapter will focus on the integration of different Clang Tools within IDEs.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Clang Compiler Frontend
Published in: Mar 2024Publisher: PacktISBN-13: 9781837630981

Author (1)

author image
Ivan Murashko

Ivan V. Murashko is a C++ software engineer: He got his PhD from Peter the Great St.Petersburg Polytechnic University and has over 20 years of C++ programming experience; since 2020 he has worked with LLVM compilers. His area of interest includes clang compiler frontend and clang tools (clang-tidy, clangd).
Read more about Ivan Murashko