Static Analysis 是基于Clang 的非常好的静态代码分析工具。
主要从以下几个方面进行检测:
-
Logic flaws, such as accessing uninitialized variables and dereferencing null pointers(逻辑错误,比如访问未初始化的变量、解引用空指针)
- Memory management flaws, such as leaking allocated memory(内存管理错误,比如内存泄露,在MRC机制下很有用)
- Dead store (unused variable) flaws(死存储,比如未使用的变量)
- API-usage flaws that result from not following the policies required by the frameworks and libraries the project is using(API使用错误)
1、点击product -> Analyze(shift+command+B)
2、选择某一条分析消息
3、点击相应的消息
4、点击箭头,查看错误跟踪线
5、编辑代码修改错误
StaticAnalysis 是一款基于 Clang 的静态代码分析工具,主要用于检测逻辑错误、内存管理错误、未使用的变量及 API 使用不当等问题。通过简单的几步操作即可帮助开发者定位并修复代码中的潜在缺陷。
1636

被折叠的 条评论
为什么被折叠?



