[all-commits] [llvm/llvm-project] 570bf9: [clang][analyzer] Remove report of null stream fro...

Balázs Kéri via All-commits all-commits at lists.llvm.org
Mon Jan 9 00:49:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 570bf972f5adf05438c7e08d693bf4b96bfd510a
      https://github.com/llvm/llvm-project/commit/570bf972f5adf05438c7e08d693bf4b96bfd510a
  Author: Balázs Kéri <1.int32 at gmail.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
    M clang/test/Analysis/std-c-library-functions-arg-enabled-checkers.c
    M clang/test/Analysis/std-c-library-functions-arg-weakdeps.c
    M clang/test/Analysis/stream-noopen.c
    M clang/test/Analysis/stream-note.c
    A clang/test/Analysis/stream-stdlibraryfunctionargs.c
    M clang/test/Analysis/stream.c

  Log Message:
  -----------
  [clang][analyzer] Remove report of null stream from StreamChecker.

The case of NULL stream passed to stream functions was reported by StreamChecker.
The same condition is checked already by StdLibraryFunctionsChecker and it is
enough to check at one place. The StreamChecker stops now analysis if a passed NULL
stream is encountered but generates no report.
This change removes a dependency between StdCLibraryFunctionArgs checker and
StreamChecker. There is now no more specific message reported by StreamChecker,
the previous weak-dependency is not needed. And StreamChecker can be used
without StdCLibraryFunctions checker or its ModelPOSIX option.

Reviewed By: Szelethus

Differential Revision: https://reviews.llvm.org/D137790




More information about the All-commits mailing list