[all-commits] [llvm/llvm-project] 854cbb: [clang][analyzer] Split NullDereferenceChecker int...

Balázs Kéri via All-commits all-commits at lists.llvm.org
Fri Jan 10 02:17:29 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 854cbbf4a8e7e98b7461eae2c2a37cfa767f791c
      https://github.com/llvm/llvm-project/commit/854cbbf4a8e7e98b7461eae2c2a37cfa767f791c
  Author: Balázs Kéri <balazs.keri at ericsson.com>
  Date:   2025-01-10 (Fri, 10 Jan 2025)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
    M clang/test/Analysis/analyzer-enabled-checkers.c
    M clang/test/Analysis/std-c-library-functions-arg-enabled-checkers.c

  Log Message:
  -----------
  [clang][analyzer] Split NullDereferenceChecker into modeling and reporting (#122139)

The checker currently reports beneath the null dereference dereferences
of undefined value and of label addresses. If we want to add more kinds
of invalid dereferences (or split the existing functionality) it is more
useful to make it separate checkers.
To make this possible the existing checker is split into a
DereferenceModeling part and a NullDereference checker that actually
only switches on the check of null dereference. This is similar
architecture as in MallocChecker and CStringChecker.

The change is almost NFC but a new (modeling) checker is added. If the
NullDereference checker is turned off the found invalid dereferences
will still stop the analysis without emitted warning (this is different
compared to the old behavior).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list