[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 12 02:23:11 PDT 2022
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
More information about the cfe-commits
mailing list