aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
diff options
context:
space:
mode:
authorYingChi Long <me@inclyc.cn>2022-08-26 19:26:32 +0800
committerYingChi Long <me@inclyc.cn>2022-09-01 10:10:10 +0800
commite3bd67eddf65b20956513e91715b1f997dae2690 (patch)
treea39dc0d846651237f962c2d3472e5d96cfff08b8 /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
parent62454e83b04ff45dc16a37a1f63185b4affc2081 (diff)
downloadllvm-e3bd67eddf65b20956513e91715b1f997dae2690.zip
llvm-e3bd67eddf65b20956513e91715b1f997dae2690.tar.gz
llvm-e3bd67eddf65b20956513e91715b1f997dae2690.tar.bz2
[clang][Sema] check default argument promotions for printf
The main focus of this patch is to make ArgType::matchesType check for possible default parameter promotions when the argType is not a pointer. If so, no warning will be given for `int`, `unsigned int` types as corresponding arguments to %hhd and %hd. However, the usage of %hhd corresponding to short is relatively rare, and it is more likely to be a misuse. This patch keeps the original behavior of clang like this as much as possible, while making it more convenient to consider the default arguments promotion. Fixes https://github.com/llvm/llvm-project/issues/57102 Reviewed By: aaron.ballman, nickdesaulniers, #clang-language-wg Differential Revision: https://reviews.llvm.org/D132568
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
0 files changed, 0 insertions, 0 deletions