[PATCH] D75612: [Analyzer][StreamChecker] Adding PreCall and refactoring (NFC).

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 6 07:09:46 PST 2020


martong added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:321
+ProgramStateRef
+StreamChecker::ensureStreamNonNull(SVal StreamVal, CheckerContext &C,
+                                   ProgramStateRef State) const {
----------------
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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75612





More information about the cfe-commits mailing list