[all-commits] [llvm/llvm-project] 3566bb: [analyzer] Add option for AddrSpace in core.NullDe...

vabridgers via All-commits all-commits at lists.llvm.org
Sun Apr 24 01:52:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3566bbe62f2ef2bf1b736d04a9d6b3c669a66297
      https://github.com/llvm/llvm-project/commit/3566bbe62f2ef2bf1b736d04a9d6b3c669a66297
  Author: Vince Bridgers <vince.a.bridgers at gmail.com>
  Date:   2022-04-24 (Sun, 24 Apr 2022)

  Changed paths:
    M clang/docs/analyzer/checkers.rst
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
    M clang/test/Analysis/analyzer-config.c
    M clang/test/Analysis/cast-value-notes.cpp

  Log Message:
  -----------
  [analyzer] Add option for AddrSpace in core.NullDereference check

    This change adds an option to detect all null dereferences for
    non-default address spaces, except for address spaces 256, 257 and 258.
    Those address spaces are special since null dereferences are not errors.

    All address spaces can be considered (except for 256, 257, and 258) by
    using -analyzer-config
    core.NullDereference:DetectAllNullDereferences=true. This option is
    false by default, retaining the original behavior.

    A LIT test was enhanced to cover this case, and the rst documentation
    was updated to describe this behavior.

Reviewed By: steakhal

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




More information about the All-commits mailing list