[PATCH] D16317: [Analyzer] Fix for PR23790: bind real value returned from strcmp when modelling strcmp.
Антон Ярцев via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 19 06:34:37 PST 2016
ayartsev created this revision.
ayartsev added a reviewer: zaks.anna.
ayartsev added a subscriber: cfe-commits.
The patch is a fix for [[ https://llvm.org/bugs/show_bug.cgi?id=23790 | PR23790 ]]. Call to StringRef::Compare() returning [1,0,-1] is replaced with the real call to strcmp to be more precise in modelling. This also may theoretically help to find defects if a tested code relays on a value returned from strcmp like
if (strcmp(x, y) == 1) { ... }
Please review!
http://reviews.llvm.org/D16317
Files:
lib/StaticAnalyzer/Checkers/CStringChecker.cpp
test/Analysis/string.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16317.45253.patch
Type: text/x-patch
Size: 4423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160119/7a316f80/attachment.bin>
More information about the cfe-commits
mailing list