martong added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/ErrnoModeling.h:110
+/// \arg \c InvalE Expression that causes invalidation of \c errno.
+ProgramStateRef setErrnoStdMustBeChecked(ProgramStateRef State,
+                                         CheckerContext &C, const Expr 
*InvalE);
----------------
Why do you consider important the `Std` part in the naming?


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:880
+
+  // In the success case, do not change 'errno' and errno state.
+  StateFailed = errno_modeling::setErrnoForStdFailure(StateFailed, C,
----------------
Could you please elaborate in the comment why don't we have to use 
`errno_modeling::setErrnoForStdSuccess` here? 


================
Comment at: clang/test/Analysis/stream-error.c:246
+  int rc = fsetpos(F, &Pos);
+  clang_analyzer_eval(feof(F)); // expected-warning{{FALSE}}
+  if (rc) {
----------------
This might be `TRUE` as well isn't it?  Because only the "successful call to 
the fseek() function clears the end-of-file indicator". I'd expect this to be 
TRUE only in the block of `if (rc)`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132249

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

Reply via email to