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.
- Intro (10 min):
- Software quality & costs
- Static analysis: basic overview (60 min + QA)
- Compiler checks
- Data flow analysis
- Within function bodies
- Within Translation Units
- Cross-TU analysis
- C++ Core Guidelines
- Enforceable and unenforceable rules
- Typical usage patterns and some typical issues with them
- Static analysis: advanced (40 min + QA)
- Syntax Style Checks
- Naming guidelines
- Specific guidelines
- And others
- How do the existing guidelines relate to each other? (10 min)
- Code analysis and C++ language support (20 min + QA)
- Parameter passing
- 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 (https://www.jetbrains.com/clion/) and some of them in ReSharper C++ on top of their VS installation (https://www.jetbrains.com/resharper-cpp/). 6-months personal licenses for these tools will be provided to every workshop participant.
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 (https://www.meetup.com/St-Petersburg-CPP-User-Group/).