[PATCH] D79433: [analyzer] StdLibraryFunctionsChecker: Add summaries for POSIX

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 5 10:46:51 PDT 2020


martong created this revision.
martong added reviewers: Szelethus, NoQ, baloghadamsoftware, balazske, steakhal.
Herald added subscribers: cfe-commits, ASDenysPetrov, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, whisperity.
Herald added a project: clang.
martong added parent revisions: D77148: [analyzer] ApiModeling: Add buffer size arg constraint with multiplier involved, D79430: [analyzer] StdLibraryFunctionsChecker: Add LazyRanges to support type dependent Max.

Add functions for POSIX. Contrary to libc, Posix functions do not contain any
nonull attributes, thus providing nonull information through this checker adds
high value. The code in this patch is auto generated from Cppcheck's config
directory (https://github.com/danmar/cppcheck/blob/master/cfg/std.cfg). The
list is as complete as it is in Cppcheck. I measered the effect of these newly
added summaries on real projects: tmux, redis, curl. The number of bugs has
increased by 3-6%. During these tests it turned out that some summaries were
not correct in the original config file for Cppcheck, those errors have been
corrected in this patch.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79433

Files:
  clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79433.262156.patch
Type: text/x-patch
Size: 64103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200505/d22cacbc/attachment-0001.bin>


More information about the cfe-commits mailing list