[clang] [clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (PR #80457)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 13 00:10:42 PST 2024


balazske wrote:

The new appeared bug reports should be similar to the ones that were observed when `StdCLibraryFunctionsChecker` was made non-alpha (and probably were checked already one time) (because the option was turned on in those tests).
A different solution can be to add a Linux-mode for the checker (change option `ModelPOSIX` to an enumeration like "C", "POSIX", "Linux"). The strict POSIX standard does not tell exactly that `fileno` fails only if the file descriptor is invalid. Probably for other functions too the man pages are more detailed about error cases, so the information increases from C to POSIX to Linux. It may be possible to automatically detect presence of Linux source code by checking some macros.

https://github.com/llvm/llvm-project/pull/80457


More information about the cfe-commits mailing list