我正在寻找一个免费的软件、工具、库或任何分析 C++ 代码的东西。
据我所知,诸如“Cppcheck”之类的“静态代码分析”工具对我没有帮助,因为我无法定义自己的规则或输出。我猜,一个能给我一个 C++ 文件的 AST(抽象语法树)的库是最好的。
我的目标是编写一个命令行工具来生成包含以下内容的输出:
Test.cpp:
The file contains 42 global Integers.
The Class Test has the following attributes:
String name,
Int size.
The Class Test contains the following global functions:
void Test(),
int getTestSize(),
String renameTest(String newName).