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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to