[PATCH] D135247: [clang][analyzer] Add stream functions to StdLibraryFunctionsChecker.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 7 00:55:08 PST 2022


balazske added a comment.

The "strange" test failures that showed up earlier were probably caused by a bug that is fixed in the D137722 <https://reviews.llvm.org/D137722>. I just read that this patch is rebased to D137722 <https://reviews.llvm.org/D137722> too, fixed the dependency stack. There was another problem with circular dependencies (because **StdCLibraryFunctionArgsChecker** had a dependency to StreamChecker, this is removed in the last patch). The checker option must be not a problem, the checker (`StdLibraryFunctionsChecker`) can be disabled (but is normally not because it is an **apiModeling** checker) or the **ModelPOSIX** option turned off independently if `StreamChecker` is enabled or not. The goal (should work at the end of this patch stack) is that StreamChecker can report all bugs that it can find, and there is no case when both checkers report a bug (in different way). If **ModelPOSIX** is turned off and StreamChecker is enabled, for `fseek` for example no bug is found if stream is NULL, and value of `errno` is just invalidated in all cases (like it works if StreamChecker is disabled too), but the stream state and file position is still checked by StreamChecker for all functions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135247



More information about the cfe-commits mailing list