[all-commits] [llvm/llvm-project] 3ff220: [analyzer][StdLibraryFunctionsChecker] Add POSIX n...
Gabor Marton via All-commits
all-commits at lists.llvm.org
Mon Jul 20 13:47:18 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 3ff220de900970a20c9882b7199c178c6b6428b2
https://github.com/llvm/llvm-project/commit/3ff220de900970a20c9882b7199c178c6b6428b2
Author: Gabor Marton <gabor.marton at ericsson.com>
Date: 2020-07-20 (Mon, 20 Jul 2020)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
A clang/test/Analysis/std-c-library-functions-POSIX-socket-sockaddr.cpp
M clang/test/Analysis/std-c-library-functions-POSIX.c
Log Message:
-----------
[analyzer][StdLibraryFunctionsChecker] Add POSIX networking functions
Summary:
Adding networking functions from the POSIX standard (2017). This includes
functions that deal with sockets from socket.h, netdb.h.
In 'socket.h' of some libc implementations (e.g. glibc) with C99, sockaddr
parameter is a transparent union of the underlying sockaddr_ family of pointers
instead of being a pointer to struct sockaddr. In these cases, the standardized
signature will not match, thus we try to match with another signature that has
the joker Irrelevant type. In the case of transparent unions, we also not add
those constraints which require pointer types for the sockaddr param.
Interestingly, in 'netdb.h' sockaddr is not handled as a transparent union.
Tags: #clang
Differential Revision: https://reviews.llvm.org/D83407
More information about the All-commits
mailing list