This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] StdLibraryFunctionsChecker: Add statistics
Needs ReviewPublic

Authored by martong on Apr 15 2020, 3:08 AM.

Diff Detail

Event Timeline

martong created this revision.Apr 15 2020, 3:08 AM
balazske added inline comments.Apr 16 2020, 3:59 AM
clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
67

This may be misleading: It is every call event that is encountered, even if not handled specially (because no summary). (I would not call a function "handled" if we do nothing with it beneath a check if it needs to be handled really.) Probably "found" is better.

68

The # of calls with summary or The # of handled calls with associated summary ?
Probably only for me but I had difficulty to understand what this means.

72

Change "argumentum" to "argument"?

steakhal marked an inline comment as done.Jul 14 2020, 4:00 AM

Besides @balazske's comments, looks good to me.

clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
504–505

At first, it was strange to check NewState != State since the addTransition will do this check regardless.
Then I recognized the statistic increment.
It makes sense to count only the new state transitions.