[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 Oct 6 06:35:18 PDT 2022


balazske added a reviewer: martong.
balazske added a comment.
Herald added a subscriber: rnkovacs.

I found some anomalies during development:

- If the checker **StdCLibraryFunctions** is added as dependency for **alpha.unix.Stream** in //checkers.td// I get some "unexplainable" test failures.
- In the comments section at CERT ERR30-C <https://wiki.sei.cmu.edu/confluence/display/c/ERR30-C.+Take+care+when+reading+errno> is pointed out that function `ftell` can change the value of `errno` if it is successful. This is the "normal" expected behavior of all standard functions unless the documentation tells other. But this place (search for ftell) <https://pubs.opengroup.org/onlinepubs/9699919799/> tells that `ftell` should not change `errno` if successful. The persons commented at the CERT rule probably checked only one or more of the C standards. But there should be no conflict between POSIX and C ("Any conflict between the requirements described here and the ISO C standard is unintentional."). It would be unconventional if different check rules are needed (and add of a global analyzer option for POSIX or C mode).


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