compare-ast-clang-and-cppcheck: Write some statistics.
This commit is contained in:
parent
aff108a16f
commit
45a89b1c46
|
@ -71,9 +71,15 @@ ast2 = cppcheck_ast(sys.argv[1])
|
||||||
# print(func)
|
# print(func)
|
||||||
|
|
||||||
print('Compare...')
|
print('Compare...')
|
||||||
|
numberOfMissing = 0
|
||||||
|
numberOfExtra = 0
|
||||||
for func in ast1:
|
for func in ast1:
|
||||||
if func not in ast2:
|
if func not in ast2:
|
||||||
print('- ' + func)
|
numberOfMissing = numberOfMissing + 1
|
||||||
#for func in ast2:
|
print('Missing Function ' + func)
|
||||||
# if func not in ast1:
|
for func in ast2:
|
||||||
# print('+ ' + func)
|
if func not in ast1:
|
||||||
|
numberOfExtra = numberOfExtra + 1
|
||||||
|
print('Extra Function ' + func)
|
||||||
|
print('Number of missing functions: ' + str(numberOfMissing))
|
||||||
|
print('Number of extra functions: ' + str(numberOfExtra) + ' (clang AST currently only contains FunctionDecl and CXXMethod)')
|
||||||
|
|
Loading…
Reference in New Issue