Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Clang Compiler Frontend

You're reading from  Clang Compiler Frontend

Product type Book
Published in Mar 2024
Publisher Packt
ISBN-13 9781837630981
Pages 326 pages
Edition 1st Edition
Languages
Author (1):
Ivan Murashko Ivan Murashko
Profile icon Ivan Murashko

Table of Contents (17) Chapters

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
Bibliography
Index Other Books You Might Enjoy Appendix 1: Compilation Database Appendix 2: Build Speed Optimization

6.7 Knowing the limitations of analysis

It’s worth mentioning some limitations of the analysis that can be conducted with Clang’s AST and CFG. The most notable ones are mentioned here [2]:

  • Limitations of Clang’s AST: Clang’s AST is unsuitable for data flow analysis and control flow reasoning, leading to inaccurate results and inefficient analysis due to the loss of vital language information. Soundness of analysis is also a consideration, where the precision of certain analyses, such as liveness analysis, can be valuable if they are precise enough rather than always being conservative.

  • Issues with Clang’s CFG: While Clang’s CFG aims to bridge the gap between AST and LLVM IR, it encounters known problems, has limited interprocedural capabilities, and lacks adequate testing coverage.

One example mentioned in [2] relates to C++ coroutines, a new feature introduced in C++20. Some aspects of this functionality are implemented outside the Clang frontend...

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 $15.99/month. Cancel anytime}