This book, "Clang Compiler Frontend: Get to grips with the internals of a C/C++ compiler frontend” – is your Clang reference that will help understand the tool’s inner mechanisms and explore its capabilities to the fullest. I wanted to teach LLVM basics and understand how to install procedures and other development tools critical for optimizing the use of Clang. Building up this strong base, you will further decode all the internal workings and features of Clang, how they integrate into the LLVM project, and become an essential part of it.
You will find out what defines the compilation process and the different options for improving it, such as C++ modules and header maps. Furthermore, you will learn about many more approaches to static code analysis with multiple options, such as clang-tidy for linting and other kinds of code manipulations. Through practical examples and hands-on exercises in the book "Clang Compiler Frontend: Get to grips with the internals of a C/C++ compiler frontend,” the prolonged title emphasizes what you are going to achieve – not just understanding the peculiarities of Clang but developing new custom-made tools that are intended for a single project, as well as enhancing one’s fluency in programming generally and efficiency in particular to a level you have never even dreamed of reaching.
Clang Compiler Frontend: Get to grips with the internals of a C/C++ compiler frontend Table of Contents:
- Chapter 1: Environment Setup
- 1.1 Technical requirements
- 1.2 Getting to know LLVM
- 1.3 Source code compilation
- 1.4 Test project – syntax check with a Clang tool
- 1.5 Summary
- 1.6 Further reading
- Chapter 2: Clang Architecture
- 2.1 Technical requirements
- 2.2 Getting started with compilers
- 2.3 Clang driver overview
- 2.4 Clang frontend overview
- 2.5 Summary
- 2.6 Further reading
- Chapter 3: Clang AST
- 3.1 Technical requirements
- 3.2 AST
- 3.3 AST traversal
- 3.4 Recursive AST visitor
- 3.5 AST matchers
- 3.6 Explore Clang AST with clang-query
- 3.7 Processing AST in the case of errors
- 3.8 Summary
- 3.9 Further reading
- Chapter 4: Basic Libraries and Tools
- 4.1 Technical requirements
- 4.2 LLVM coding style
- 4.3 LLVM basic libraries
- 4.4 Clang basic libraries
- 4.5 LLVM supporting tools
- 4.6 Clang plugin project
- 4.7 Summary
- 4.8 Further reading
- Chapter 5: Clang-Tidy Linter Framework
- 5.1 Technical requirements
- 5.2 Overview of Clang-Tidy and usage examples
- 5.3 Clang-Tidy’s internal design
- 5.4 Custom Clang-Tidy check
- 5.5 Summary
- 5.6 Further reading
- Chapter 6: Advanced Code Analysis
- 6.1 Technical requirements
- 6.2 Static analysis
- 6.3 CFG
- 6.4 Custom CFG check
- 6.5 CFG on Clang
- 6.6 Brief description of Clang analysis tools
- 6.7 Knowing the limitations of analysis
- 6.8 Summary
- 6.9 Future reading
- Chapter 7: Refactoring Tools
- 7.1 Technical requirements
- 7.2 Custom code modification tool
- 7.3 Clang-Tidy as a code modification tool
- 7.4 Code modification and Clang-Format
- 7.5 Summary
- 7.6 Further reading
- Chapter 8: IDE Support and Clangd
- 8.1 Technical requirements
- 8.2 Language Server Protocol
- 8.3 Environment setup
- 8.4 LSP demo
- 8.5 Integration with Clang Tools
- 8.6 Performance optimizations
- 8.7 Summary
- 8.8 Further reading
- Appendix 1: Compilation Database
- 9.1 Compilation database definition
- 9.2 CDB creation
- 9.3 Clang tools and a CDB
- 9.4 Further reading
- Appendix 2: Build Speed Optimization
Who is this course for?
- Experienced C++ software engineers
- Experts in compiler design for engineers who have not previously designed a compiler
- People interested in the Clang tool that is used in the Apple system and programming configuration
Click on the links below to Download Clang Compiler Frontend: Get to grips with the internals of a C/C++ compiler frontend!
You are replying to :