Bringing Clang-tidy Magic to Visual Studio C++ Developers
summary
A 2.5 million‑line Windows C++ codebase across 134 Visual Studio projects compiles with Clang after a multi‑month effort that introduces a configurable PowerShell script for MSBuild extraction, parallel parse and clang-tidy runs, Jenkins CI jobs that block commits on Clang failures, and an open‑source Visual Studio extension Clang Power Tools. Large automated modernize and static‑analysis fixes (nullptr, range‑for, make_unique, cppcoreguidelines, reorder initializers) run at scale; the whole tree reaches Clang -Wall and most transforms succeed but require manual review and test coverage.
AI-written summary · about
chapters (23)
- 0:00Introduction to Clang-tidy
- 2:58Why adopt Clang tools
- 7:06Automation with PowerShell
- 12:22Team effort and tools
- 18:50Developer workflow in VS
- 23:49Getting the extension
- 27:57Future plans and roadmap
- 30:21Q&A: Third-party headers
- 33:14Q&A: Extension feedback
- 36:09Q&A: Project file handling
- 38:43Q&A: Transformation safety
- 41:53Q&A: Validation of changes
- 44:28Q&A: Making code Clang-compatible
- 46:58Q&A: Clang-format integration
- 48:48Q&A: Workload and effort
- 50:34Q&A: Metrics and results
- 51:41Q&A: Bug fixing vs modernization
- 53:04Q&A: Large codebase experience
- 53:45Q&A: Branch merging issues
- 55:07Q&A: Most surprising bug
- 56:36Q&A: Production compiler
- 58:01Q&A: Jenkins CI setup
- 59:46Q&A: Function replacement
