[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 8 07:00:05 PST 2022


balazske added a comment.

My current approach is that the POSIX is more strict than the C standard (POSIX allows a subset of what C allows). I do not see (errno related) contradiction between these standards (except initialization to zero of errno missing from POSIX, and possible negative value in errno in POSIX). The checker currently works only in POSIX mode for every function, the **ModelPOSIX** setting controls only if additional functions are added (all with POSIX rules) (these functions could be added with C rules too). One problem exists now, that `errno` is set to a non-zero (but not positive only) value at error. Probably we should change this to be always positive at error, according to the C standard `errno` is positive only, and POSIX does not tell that errno can be negative.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135360/new/

https://reviews.llvm.org/D135360



More information about the cfe-commits mailing list