[all-commits] [llvm/llvm-project] 2c60f9: [clang][analyzer] Add report of NULL stream to Str...

Balázs Kéri via All-commits all-commits at lists.llvm.org
Tue Jun 6 02:52:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c60f9c8a4fdfce7f33493f874893e1c8c8143c1
      https://github.com/llvm/llvm-project/commit/2c60f9c8a4fdfce7f33493f874893e1c8c8143c1
  Author: Balázs Kéri <balazs.keri at ericsson.com>
  Date:   2023-06-06 (Tue, 06 Jun 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-note.c
    M clang/test/Analysis/stream-stdlibraryfunctionargs.c
    M clang/test/Analysis/stream.c

  Log Message:
  -----------
  [clang][analyzer] Add report of NULL stream to StreamChecker.

The report of NULL stream was removed in commit 570bf97.
The old reason is not actual any more because the checker dependencies are changed.
It is not good to eliminate a failure state (where the stream is NULL) without
generating a bug report because other checkers are not able to find it later.
The checker did this with the NULL stream pointer, and because this checker
runs now before other checkers that can detect NULL pointers, the null pointer
bug was not found at all.

Reviewed By: steakhal

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




More information about the All-commits mailing list