[all-commits] [llvm/llvm-project] 37785f: [clang][analyzer] Bring cplusplus.ArrayDelete out ...

Discookie via All-commits all-commits at lists.llvm.org
Mon Mar 25 03:09:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 37785fedabd8fa752129ef5bac3462311af91c35
      https://github.com/llvm/llvm-project/commit/37785fedabd8fa752129ef5bac3462311af91c35
  Author: Discookie <viktor.cseh at ericsson.com>
  Date:   2024-03-25 (Mon, 25 Mar 2024)

  Changed paths:
    M clang/docs/analyzer/checkers.rst
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/CXXDeleteChecker.cpp
    M clang/test/Analysis/ArrayDelete.cpp
    M clang/www/analyzer/alpha_checks.html
    M clang/www/analyzer/available_checks.html

  Log Message:
  -----------
  [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha (#83985)

The checker finds a type of undefined behavior, where if the type of a
pointer to an object-array is different from the objects' underlying
type, calling `delete[]` is undefined, as the size of the two objects
might be different.

The checker has been in alpha for a while now, it is a simple checker
that causes no crashes, and considering the severity of the issue, it
has a low result-count on open-source projects (in my last test-run on
my usual projects, it had 0 results).

This commit cleans up the documentation and adds docs for the limitation
related to tracking through references, in addition to moving it to
`cplusplus`.

---------

Co-authored-by: Balazs Benics <benicsbalazs at gmail.com>
Co-authored-by: whisperity <whisperity at gmail.com>



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