[PATCH] D154423: [clang][analyzer] Add all success/failure messages to StdLibraryFunctionsChecker.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 14 08:33:00 PDT 2023


balazske added a comment.

About the "`fileno` with standard stream" problem: I do not see an always good solution for this case because these standard streams are global variables. If we want to be exact, we can not know much about these at analysis start unless it is the `main` function. The standard stream variables can be overwritten by the program or opened or closed, even if not, any unknown function can change the state of these. Because the possibility to change these, the file number can change.
At least it is possible to add a checker option for "the program does not manipulate standard streams". If this is true the standard streams are different values from all other opened streams and the file number is known. This can be the default value, most programs probably work this way.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154423



More information about the cfe-commits mailing list