balazske marked an inline comment as done.
balazske added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:670
 
-  State = State->set<StreamMap>(StreamSym, StreamState::getOpened(Desc));
+  // FilePositionIndeterminate is not cleared.
+  State = State->set<StreamMap>(
----------------
Szelethus wrote:
> But what if I inspect errno and conclude that the file position is intact? Is 
> there such a thing? After a call to stream operation that might leave the 
> file position indicator indeterminate and getting ferror, am I supposed to 
> fseek or reopen the file no matter what?
> 
> 
There is not much information about what `errno` values mean an indeterminate 
file position (and what errno values are possible at all after a specific 
operation). Probably we can assume that only position reset (`fseek`, 
`fsetpos`, `rewind`) and `fflush` fixes the wrong state. Many of stream 
handling code anyway aborts the operation if error happens.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80018



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

Reply via email to