简体   繁体   English

如何使用Eclipse CDT对C ++代码进行静态分析?

[英]How to do static analysis for C++ code with Eclipse cdt?

I need to get the static information of C++ program with CDT. 我需要使用CDT获得C ++程序的静态信息。 No need to build the project, just to get the basic information(namespace, class, extends relation, method, call, field) and save them to database. 无需构建项目,只需获取基本信息(名称空间,类,扩展关系,方法,调用,字段)并将其保存到数据库即可。 Is there any code examples or opensource plugin? 有任何代码示例或开源插件吗? thx! 谢谢!

I have tried a lot of methods but they do not work very well. 我尝试了很多方法,但是效果不佳。 someone says that codan is a choice, but it doesn't work on my environment... 有人说柯丹是一种选择,但对我的环境不起作用...

PS: CDT is necessary. PS:CDT是必需的。 I use Eclipse Indigo. 我使用Eclipse Indigo。

Eclipse CDT has already built-in tools for extends relation, method call. Eclipse CDT已经具有用于扩展关系,方法调用的内置工具。 It is Type Hierarchy view and Call Hierarchy view . 它是Type Hierarchy视图Call Hierarchy视图 You have to build Index of your project for all this tools to work. 您必须为所有这些工具建立项目索引。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM