]> granicus.if.org Git - clang/commit
[Analyzer] alpha.unix.cstring.OutOfBounds checker enable/disable fix
authorAdam Balogh <adam.balogh@ericsson.com>
Fri, 13 Jul 2018 13:44:44 +0000 (13:44 +0000)
committerAdam Balogh <adam.balogh@ericsson.com>
Fri, 13 Jul 2018 13:44:44 +0000 (13:44 +0000)
commitff0bfffe182b84fdf08ee78d03df464a4191aaa0
tree4fa40d0266fb6b1a36d68005848b4aa890805729
parent08b72986d5d53d57e461c87c49046f2728edcabe
[Analyzer] alpha.unix.cstring.OutOfBounds checker enable/disable fix

It was not possible to disable alpha.unix.cstring.OutOfBounds checker's reports
since unix.Malloc checker always implicitly enabled the filter. Moreover if the
checker was disabled from command line (-analyzer-disable-checker ..) the out
of bounds warnings were nevertheless emitted under different checker names such
as unix.cstring.NullArg, or unix.Malloc.

This patch fixes the case sot that Malloc checker only enables implicitly the
underlying modeling of strcpy, memcpy etc. but not the warning messages that
would have been emmitted by alpha.unix.cstring.OutOfBounds

Patch by: Dániel Krupp

Differential Revision: https://reviews.llvm.org/D48831

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337000 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/CStringChecker.cpp
test/Analysis/cstring-plist.c [new file with mode: 0644]
test/Analysis/malloc.c
test/Analysis/string.c