[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.
Henry Wong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 15 07:07:07 PDT 2018
MTC updated this revision to Diff 146816.
MTC added a comment.
- According to NoQ's suggestion, use `assumeZero()` instead of `isZeroConstant()` to determine whether the value is 0.
- Add test `memset26_upper_UCHAR_MAX()` and `memset27_symbol()`
- Since `void *memset( void *dest, int ch, size_t count );` will converts the value `ch` to `unsigned char`, we call `evalCast()` accordingly.
Repository:
rC Clang
https://reviews.llvm.org/D44934
Files:
lib/StaticAnalyzer/Checkers/CStringChecker.cpp
test/Analysis/bstring.cpp
test/Analysis/null-deref-ps-region.c
test/Analysis/string.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44934.146816.patch
Type: text/x-patch
Size: 23177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180515/ea33797a/attachment-0001.bin>
More information about the cfe-commits
mailing list