0:00 / 0:00
P. Goldsborough “clang-useful: Building useful tools with LLVM and clang for fun and profit"
CppNow
39K subscribers • 42 videos on Hallway • Conference channel
- One of the most-watched uploads on C++Now, a conference or university channel Hallway lists. Nobody has recommended it in the communities yet, so it ranks below community picks.
- Presented by Peter Goldsborough
- Linked in the descriptionboostcon/cppnow_presentations_2017
Intermediate. Assumes working knowledge.
33K views9 years ago
Systems programmingProgramming languagesCompilers and interpretersC++
Peter Goldsborough explains how to build custom static analysis and source transformation tools using the LLVM and Clang library infrastructure.
cppnow.org — Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/boostcon/cppnow_presentations_2017 — The talk will consist of two parts. The first will be a general overview of the LLVM and clang library infrastructure available for creating custom tools such as static analyzers or source-to-source transformation tools. I will explain the ecosystem of the LLVM and clang tooling environment and outline options, tradeoffs and examples of the different ways of creating a tool (e.g. the difference between creating a plugin vs. a LibTooling executable). I will then go further in depth about how clang represents C++ source code by means of an AST and ways of traversing the AST to look for certain points of interest, e.g. old-style for loops that could be converted to range-based loops, or braces that are indented in Allman instead of One-True-Brace-Style, which could be useful for any company with a style guide it wants to enforce at compile-time rather than on paper or in code-reviews. For the second part, I will then branch out into the two common tasks one might want to perform with a custom-built tool: emitting warnings or errors (for static analysis), and transforming and emitting new code (source-to-source transformations, such as clang-tidy). For each use-case, I will walk through real code that shows how one might approach a simple task in each category. At the end of the talk, I expect listeners to have a basic understanding of the LLVM/clang tooling environment and AST representation. However, most importantly, I expect people to take away knowledge they can take home or to their office and immediately build tools in no time at all that *genuinely* improve their workflow and productivity. This is not a "give a man a fish" talk. This is a "teach a man to fish" talk. — I'm Peter and technically a second year CS student at TU Munich. Practically, I'm a first year student who decided to do a gap year and join the workforce. Since last August I've been doing engineering internships: first Google, then Bloomberg, now Facebook. I currently physically reside in London but really live on GitHub, where I enjoy giving back to and working with the community on a variety of projects. My comfort zone is the intersection of blue skies machine learning research and low-level infrastructure engineering in modern C++. — Videos Filmed & Edited by Bash Films: BashFilms.com --- *--* ---Why it's here
A top upload from a listed channelC++Now is on Hallway's list of conference and university channels, and this upload is one of its most-watched talks or lectures. Nobody has recommended it in the communities yet, so it ranks below community picks.