Title: Lecture Slides for the Clang Libraries [LLVM/Clang 15] (Edition 0.0) Author: Michael D. Adams Abstract: This document, which consists of approximately 280 slides, offers a basic introduction to the Clang libraries. To begin, some basics of compilers are introduced (such as the general structure of a compiler). Then, a brief overview of the LLVM/Clang software is given from the perspective of a compiler user (considering topics such as compiler drivers). Finally, the Clang libraries are discussed in some detail, and numerous code examples are presented. Some of the aspects of the Clang (and LLVM) libraries covered include: - the CommandLine Library (from LLVM); - compilation databases (JSON and fixed); - arguments adjusters; - the Clang abstract syntax tree (AST); - frontend actions for custom processing in the compiler frontend; - preprocessor callbacks for custom processing during preprocessing; - AST frontend actions for custom processing involving ASTs; - traversing ASTs with AST visitors; - the management of source code (e.g., source managers and source locations); - diagnostics handling; - finding nodes in ASTs with AST matchers; - generating and using control flow graphs (CFGs); and - performing live variable analysis. A companion Git repository is provided that holds all of the code examples from the slides, as well as a few additional code examples. This Git repository can be found at: https://github.com/mdadams/clang_libraries_companion A download link for the lecture slides is also available from the above GitHub page.