Behind the scenes of upgrading a static analyzer to C++20
summary
SonarSource upgrades its C++ analyzer to C++20 by relying on clang and updates SonarLint/SonarQube/SonarCloud across 27 languages and three products; work touches ~500 existing C++ rules and adds checks for std::contains, mathematical constants, std::jthread vs std::thread recommendations, and consteval misuse that makes if constexpr always take the wrong branch. Tooling uses clang-query and Godbolt to debug AST rewrites (spaceship operator changes) and whitelist new ranges algorithms; namespace collapse and bind_front required rule rewrites and validation.
AI-written summary · about
chapters (5)
- 0:00Introduction and context
- 2:11Benefiting from new features
- 7:45Handling tricky new features
- 14:17Adapting existing rules
- 24:12Q&A and summary
related talks
01h 05mChallenges and Benefits of Upgrading Sea of Thieves From C++14 to C++20
51mCode Analysis ++
01h 01mMoving to C++20 for Fun, Beauty... and Results!
01h 01m“Static Analysis and C++: More Than Lint"
01h 32mClosing Keynote: C++ Development Tools: Past, Present and Future
54mA look at C++ through the glasses of a language tool
59mC++20: An (Almost) Complete Overview
33mMSVC C++20/23 Update
