Clone wiki

CCCCC / Home


CCCCC stands for C and C++ Code Counter using Clang.

Similar to CCCC, CCCCC is a tool which analyzes C/C++ files and generates a report on various metrics of the code. Metrics supported include lines of code, McCabe's Cyclomatic Complexity, Halstead metrics

Basic Usage

ccccc.exe srcFiles > output.html

It will create a report in output.html with each function and associated counters.

it currently may output in stderr some errors about header file not found. You may ignore them (some prototype may be wrong in the report for unknown type) or fix include path with -I option (like with gcc).


That is the result applied on ccccc src files:

CCCCC report


-I, --include-dir=dir Add the directory dir to the list of directories to be searched for header files.

-D, --define=name Predefine name as a macro, with definition.

-p, --pch=pch-file compiled header path

-e, --extra-option=option Extra option directly given to the clang parser (as -e "-std=c++11").

CCCCC supports response file, i.e. `@my_response_file` in command line. Content of the response file is the command line arguments optionally split by line.