[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)
commitbfe30c39d47b6f06b1af5800494370abf71311db
tree2be6a4894c083cc4a27c8ecdf21870fbf12ba003
parent7e6b46e94a8663d69ef0f433e6ae4967a95f15c0
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364868 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/CStringChecker.cpp
test/Analysis/string.c