[analyzer] CStringChecker: Modernize to use CallDescriptions.
authorArtem Dergachev <artem.dergachev@gmail.com>
Mon, 1 Jul 2019 23:02:10 +0000 (23:02 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 1 Jul 2019 23:02:10 +0000 (23:02 +0000)
commit35fdec1b54c6a8b1ca7bee542836abf29c75a85d
tree3e70c9a59136a37dde5b8474177f4f87e9e6a84c
parentf301096f51133b4f18c383deb9679f217c1ea08b
[analyzer] CStringChecker: Modernize to use CallDescriptions.

This patch uses the new CDF_MaybeBuiltin flag to handle C library functions.
It's mostly an NFC/refactoring pass, but it does fix a bug in handling memset()
when it expands to __builtin___memset_chk() because the latter has
one more argument and memset() handling code was trying to match
the exact number of arguments. Now the code is deduplicated and there's
less room for mistakes.

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

llvm-svn: 364868
clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
clang/test/Analysis/string.c