Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Clang Compiler Frontend

You're reading from   Clang Compiler Frontend Get to grips with the internals of a C/C++ compiler frontend and create your own tools

Arrow left icon
Product type Paperback
Published in Mar 2024
Publisher Packt
ISBN-13 9781837630981
Length 326 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Ivan Murashko Ivan Murashko
Author Profile Icon Ivan Murashko
Ivan Murashko
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part I: Clang Setup and Architecture
2. Chapter 1: Environment Setup FREE CHAPTER 3. Chapter 2: Clang Architecture 4. Chapter 3: Clang AST 5. Chapter 4: Basic Libraries and Tools 6. Part II: Clang Tools
7. Chapter 5: Clang-Tidy Linter Framework 8. Chapter 6: Advanced Code Analysis 9. Chapter 7: Refactoring Tools 10. Chapter 8: IDE Support and Clangd 11. Part III: Appendix
12. Bibliography
13. Index 14. Other Books You Might Enjoy Appendix 1: Compilation Database 1. Appendix 2: Build Speed Optimization

Who this book is for

The book is written for C++ engineers who don’t have prior knowledge of compilers but wish to gain this knowledge and apply it to their daily activities. It provides an overview of the Clang compiler frontend, an essential yet often underestimated part of LLVM. This section of the compiler, along with a collection of powerful tools, enables programmers to enhance code quality and the overall development process. For example, Clang-Tidy offers more than 500 different lint checks that detect anti-patterns in code (such as use after move) and help maintain code style and standards. Another notable tool is Clang-Format, which allows specifying various formatting rules suitable for your project. These tools can also be considered an integral part of the development process. For instance, the language server (Clangd) is a critical service providing navigation and refactoring support for your IDE.

Understanding compiler internals might be crucial for anyone wanting to create and use such tools. The book provides the necessary foundation to begin this journey, covering basic LLVM architecture and offering a detailed description of Clang internals. It includes examples from LLVM source code and custom tools that extend the basic functionality provided by the compiler. Additionally, the book addresses compilation databases and various performance optimizations that can enhance the build speed of your projects. This knowledge should help C++ developers correctly apply the compiler to their work activities.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime