Book description
Boost your productivity with a variety of compiler tools that integrate seamlessly into your IDE
Key Features
- Expand your understanding of the C++ programming language by learning about how the C++ compiler works and how to utilize its advanced features
- Explore techniques for static code analysis and use them to create lint checks
- Enhance your IDE to support advanced compiler tools
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
Discover the power of Clang, a versatile compiler known for its compilation speed and insightful error and warning messages. This book will get you acquainted with the capabilities of Clang, helping you harness its features for performance improvements and modularity by creating custom compiler tools.
While focused on Clang compiler frontend, this book also covers other parts of LLVM, essential to understanding Clang's functionality, to keep up with the constantly evolving LLVM project.
Starting with LLVM fundamentals, from installation procedures to development tools, this book walks you through Clang's internal architecture and its integral role within LLVM. As you progress, you’ll also tackle optimizing compilation performance through features such as C++ modules and header maps.
The later chapters cover tools developed using the Clang/LLVM, including clang-tidy for linting, refactoring tools, and IDE support, and feature many examples to illustrate the material.
By the end of this book, you’ll have a solid understanding of Clang, different Clang Tools, and how to use them to their fullest potential.
What you will learn
- Get to grips with compiler architecture
- Gain an understanding of the inner workings of Clang
- Familiarize yourself with features specific to Clang
- Investigate various techniques for static code analysis
- Acquire knowledge on how to use AST matchers
- Create custom code modification and refactoring tools
- Explore tools for integrating compiler tools with IDEs
Who this book is for
This book is for experienced C++ software engineers who have no prior experience with compiler design but want to gain the knoweldge they need to get up and running. Engineers who want to learn about how Clang works and familiarize themselves with its specific features will also benefit from this book.
Table of contents
- Preface
- Part I: Clang Setup and Architecture
- Chapter 1: Environment Setup
- Chapter 2: Clang Architecture
- Chapter 3: Clang AST
- Chapter 4: Basic Libraries and Tools
- Part II: Clang Tools
- Chapter 5: Clang-Tidy Linter Framework
- Chapter 6: Advanced Code Analysis
- Chapter 7: Refactoring Tools
- Chapter 8: IDE Support and Clangd
- Part III: Appendix
- Appendix 1: Compilation Database
- Appendix 2: Build Speed Optimization
- Bibliography
- Index
- Other Books You Might Enjoy
Product information
- Title: Clang Compiler Frontend
- Author(s):
- Release date: March 2024
- Publisher(s): Packt Publishing
- ISBN: 9781837630981
You might also like
book
LLVM Techniques, Tips, and Best Practices Clang and Middle-End Libraries
Learn how you can build the next big programming language, compiler, or source code analyzer using …
book
Programming with Rust
Make Rust a key tool in your arsenal, and access one of the industry's fastest-growing areas …
book
Template Metaprogramming with C++
Understand how to use modern C++ templates for writing maintainable, robust, and fast software Key Features …
book
Advanced C and C++ Compiling
Learning how to write C/C++ code is only the first step. To be a serious programmer, …