[all-commits] [llvm/llvm-project] 71ae85: [clang][analyzer] Rename DeleteWithNonVirtualDtorC...
Discookie via All-commits
all-commits at lists.llvm.org
Tue Oct 10 01:37:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 71ae858c079f9b4a1a99511af57f47ffb6070920
https://github.com/llvm/llvm-project/commit/71ae858c079f9b4a1a99511af57f47ffb6070920
Author: Viktor Cseh <viktor.cseh at ericsson.com>
Date: 2023-10-10 (Tue, 10 Oct 2023)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
A clang/lib/StaticAnalyzer/Checkers/CXXDeleteChecker.cpp
R clang/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp
Log Message:
-----------
[clang][analyzer] Rename DeleteWithNonVirtualDtorChecker to CXXDeleteChecker
This rename is done in a separate commit to preserve `git blame`,
before implementing CXXArrayDeleteChecker and refactoring the file.
Differential Revision: https://reviews.llvm.org/D158156
Commit: 0e246bb67573799409d0085b89902a330998ddcc
https://github.com/llvm/llvm-project/commit/0e246bb67573799409d0085b89902a330998ddcc
Author: Viktor Cseh <viktor.cseh at ericsson.com>
Date: 2023-10-10 (Tue, 10 Oct 2023)
Changed paths:
M clang/docs/analyzer/checkers.rst
M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
M clang/lib/StaticAnalyzer/Checkers/CXXDeleteChecker.cpp
A clang/test/Analysis/ArrayDelete.cpp
M clang/test/Analysis/DeleteWithNonVirtualDtor.cpp
M clang/www/analyzer/alpha_checks.html
Log Message:
-----------
[clang][analyzer] Add C++ array delete checker
This checker reports cases where an array of polymorphic objects are
deleted as their base class. Deleting an array where the array's static
type is different from its dynamic type is undefined.
Since the checker is similar to DeleteWithNonVirtualDtorChecker, I
refactored that checker to support more detection types.
This checker corresponds to the SEI Cert rule EXP51-CPP: Do not delete
an array through a pointer of the incorrect type.
Differential Revision: https://reviews.llvm.org/D158156
Compare: https://github.com/llvm/llvm-project/compare/8cc2b51e63f2...0e246bb67573
More information about the All-commits
mailing list