Clang Thread Safety Analysis
The Clang Thread Safety Analysis tool uses source code annotations to declare and enforce thread safety policies in C and C++ programs. The tool is part of Clang, a production-quality C/C++ compiler available on most platforms. Once the source code has been annotated with thread capability attributes, it can be analyzed by Clang using the
-Wthread-safety command line warning flag. The full list of capability attributes supported can be found in the
This analysis is deployed on a large scale at Google, where it has gained widespread adoption. In this setting, the need for annotations has not been a liability, and even benefits software evolution and maintenance.
Explore the download and recommended resources on the right. More about this tool and how to use it are included in Aaron Ballman's blog post Thread Safety Analysis in C and C++.
Contact us if you have questions or need more information.