[all-commits] [llvm/llvm-project] 4f0436: [clang][analyzer] Merge apiModeling.StdCLibraryFun...

Balázs Kéri via All-commits all-commits at lists.llvm.org
Thu Jun 1 00:55:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f0436dd1532d7534d77e6fc211a7a50bbdd0c49
      https://github.com/llvm/llvm-project/commit/4f0436dd1532d7534d77e6fc211a7a50bbdd0c49
  Author: Balázs Kéri <balazs.keri at ericsson.com>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M clang/docs/analyzer/checkers.rst
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
    M clang/test/Analysis/PR49642.c
    M clang/test/Analysis/analyzer-config.c
    M clang/test/Analysis/analyzer-enabled-checkers.c
    M clang/test/Analysis/conversion.c
    M clang/test/Analysis/errno-stdlibraryfunctions-notes.c
    M clang/test/Analysis/errno-stdlibraryfunctions.c
    M clang/test/Analysis/std-c-library-functions-POSIX-lookup.c
    M clang/test/Analysis/std-c-library-functions-POSIX-socket-sockaddr.cpp
    M clang/test/Analysis/std-c-library-functions-POSIX.c
    M clang/test/Analysis/std-c-library-functions-arg-constraints-note-tags.cpp
    M clang/test/Analysis/std-c-library-functions-arg-constraints-notes.cpp
    M clang/test/Analysis/std-c-library-functions-arg-constraints-tracking-notes.c
    M clang/test/Analysis/std-c-library-functions-arg-constraints.c
    M clang/test/Analysis/std-c-library-functions-arg-constraints.cpp
    M clang/test/Analysis/std-c-library-functions-arg-cstring-dependency.c
    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/std-c-library-functions-eof.c
    M clang/test/Analysis/std-c-library-functions-inlined.c
    M clang/test/Analysis/std-c-library-functions-lookup.c
    M clang/test/Analysis/std-c-library-functions-lookup.cpp
    M clang/test/Analysis/std-c-library-functions-path-notes.c
    M clang/test/Analysis/std-c-library-functions-restrict.c
    M clang/test/Analysis/std-c-library-functions-restrict.cpp
    M clang/test/Analysis/std-c-library-functions-vs-stream-checker.c
    M clang/test/Analysis/std-c-library-functions.c
    M clang/test/Analysis/std-c-library-functions.cpp
    M clang/test/Analysis/std-c-library-posix-crash.c
    M clang/test/Analysis/stream-errno-note.c
    M clang/test/Analysis/stream-errno.c
    M clang/test/Analysis/stream-noopen.c
    M clang/test/Analysis/stream-note.c
    M clang/test/Analysis/stream-stdlibraryfunctionargs.c
    M clang/test/Analysis/weak-dependencies.c

  Log Message:
  -----------
  [clang][analyzer] Merge apiModeling.StdCLibraryFunctions and StdCLibraryFunctionArgs checkers into one.

Main reason for this change is that these checkers were implemented in the same class
but had different dependency ordering. (NonNullParamChecker should run before StdCLibraryFunctionArgs
to get more special warning about null arguments, but the apiModeling.StdCLibraryFunctions was a modeling
checker that should run before other non-modeling checkers. The modeling checker changes state in a way
that makes it impossible to detect a null argument by NonNullParamChecker.)
To make it more simple, the modeling part is removed as separate checker and can be only used if
checker StdCLibraryFunctions is turned on, that produces the warnings too. Modeling the functions
without bug detection (for invalid argument) is not possible. The modeling of standard functions
does not happen by default from this change on.

Reviewed By: Szelethus

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




More information about the All-commits mailing list