Things I learned from the static analyzer
summary
Static analyzers like clang-tidy and cppcheck give concrete, actionable findings not vague advice they flag missing =delete or =default, prefer using over typedef, suggest direct member initializers, and point out loops that should use STL algorithms. They detect performance wins such as pass-by-value-and-move, reveal object slicing and static initialization exceptions, and surface exceptions thrown before main. The tools are free open source and produce specific edits that reduce bugs and maintenance cost.
AI-written summary · about
chapters (20)
- 0:00Intro
- 1:19What can they do for us?
- 3:44Focus areas
- 6:20Used static code analyzers for this talk
- 7:16Typedef vs using
- 8:40Default member initialization
- 9:15Delegating constructors
- 11:52Defaulting/deleting constructors destructors
- 12:58Pass by const reference
- 14:48Pass by value and more
- 17:13Benchmark
- 18:05Allow copy elision
- 23:18Program memory layout
- 24:58Crash before main starts
- 27:22Problem statement
- 28:26Behind the scenes
- 30:44Rule of three/five enforcement
- 31:25Object slicing protection
- 32:35Conclusion
- 33:27Thank you!
related talks
29m“The Current State of (free) Static Analysis"
01h 01mMake Friends with the Clang Static Analysis Tools
43mEverything I learned about static analysis and program safety in C++
01h 12mFinding Bugs with Clang at Compile and Run Time
14mTool Talk: CodeChecker
01h 00mStatic Analysis and Program Safety in C++: Making it Real
01h 03m“Secure Coding Best Practices: Your First Line Is The Last Line Of Defense (2 of 2)”
50mSecure development with C++ - Lessons and techniques
