HomePhabricator

[analyzer] Fix for PR23790 : constrain return value of strcmp() rather than…

Description

[analyzer] Fix for PR23790 : constrain return value of strcmp() rather than returning a concrete value.

The function strcmp() can return any value, not just {-1,0,1} : "The strcmp(const char *s1, const char *s2) function returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string pointed to by s2." [C11 7.24.4.2p3]
https://llvm.org/bugs/show_bug.cgi?id=23790
http://reviews.llvm.org/D16317

Details

Committed
ayartsevMay 19 2016, 4:03 PM
Parents
rL270153: Allow -inline-threshold to override default threshold.
Branches
Unknown
Tags
Unknown