martong added a comment.

The bugreports look promising. However, I think we desperately need a note that 
describes which function has set the `errno_modeling` state. Below I'd expect 
the following notes for the highlighted function call.

- assuming return value of `mkdir` is in range [0, INT_MAX]
- errno is not set

F23040017: image.png <https://reviews.llvm.org/F23040017>

I suppose, you'd need to add some changes for these both in the ErrnoChecker 
and here as well.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:435
+      assert(Cond);
+      State = State->assume(*Cond, true);
+      return errno_modeling::setErrnoValue(State, C.getLocationContext(),
----------------
Please check if `State` can be nullptr.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125400

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

Reply via email to