Adding PreCall callback.
Argument validity checks are moved into the PreCall callback.
Code is restructured, functions renamed.
There are "pre" and "eval" functions for the file operations.
And additional state check (validate) functions.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Wouldn't it be better just to upload this diff to D75163 by the way? It feels like we're discarding much of the discussion.
clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp | ||
---|---|---|
321 | Just a quick note here. We are going to be able to do similar arg checks but in a generic way, once apiModeling.StdLibraryFunctionsChecker is clever enough. https://reviews.llvm.org/D75063 |
Just a quick note here. We are going to be able to do similar arg checks but in a generic way, once apiModeling.StdLibraryFunctionsChecker is clever enough. https://reviews.llvm.org/D75063
Sooner or later we will have a summary for these file handling functions, and that time the non-null argument constraint violation will be reported by either of the two checkers. Then we would be able to remove the nonnull check from here if we make StdLibraryFunctionsChecker a dependency.