Code Analysis++

Anastasia Kazakova

half-day workshop
10:30-15:15, Wednesday, 30th June 2021

Martin Fowler once wrote that high-quality software is actually cheaper to produce than low-quality software. We agree with that sentiment, and we warmly welcomed the C++ Core Guidelines when they were introduced in 2015. Research and surveys conducted in the C++ Community consistently demonstrate the popularity of the Clang family of tools, as well as the growing demand for static analysis to be added to code editors.

In this talk, we’ll explore the current capabilities of existing C++ static analyzers and discuss some of the enforcements listed in the C++ Core Guidelines from a toolability aspect. We’ll also look into the recent “Simplify C++” trend in the language’s evolution, and to wrap things up we’ll take a look at how technology-specific analysis (like MISRA and AUTOSAR) is being adopted.

A variety of checks will be discussed, from catching a dangling pointer to conforming to the preferred code style and naming scheme. And I want to share a crazy idea I have about gamifying static analysis. Let’s play!

Timing is approximate just to give you an estimation.

  1. Intro (10 min):
  2. Software quality & costs
  3. Tools
  4. Static analysis: basic overview (60 min + QA)
  5. Compiler checks
  6. Data flow analysis
    • Within function bodies
    • Within Translation Units
    • Cross-TU analysis
  7. C++ Core Guidelines
    • Intro
    • Enforceable and unenforceable rules
    • Tools
  8. Clang-Tidy
    • Typical usage patterns and some typical issues with them
  9. Static analysis: advanced (40 min + QA)
  10. Syntax Style Checks
  11. Naming guidelines
  12. Specific guidelines
    • Qt/Clazy
    • MISRA
    • And others
  13. How do the existing guidelines relate to each other? (10 min)
  14. Code analysis and C++ language support (20 min + QA)
  15. Contracts
  16. Lifetimes
  17. Parameter passing
  18. To wrap up and have some rest: the idea of gamifying the analysis (10 min + final QA)

We will be talking a lot about existing tools, but not focusing on just one. Participants may follow quite many of my examples in CLion ( and some of them in ReSharper C++ on top of their VS installation ( 6-months personal licenses for these tools will be provided to every workshop participant.

Anastasia Kazakova

As a C and C++ software developer, Anastasia Kazakova created real-time *nix-based systems and pushed them to production for 8 years. She has a passion for networking algorithms and embedded programming and believes in good tooling. With all her love for C++, she is now the Product Marketing Manager on the JetBrains C++ tools team. Besides, Anastasia runs a C++ user group in Saint-Petersburg, Russia (