History log of /llvm-project/clang/lib/StaticAnalyzer/Checkers/CXXDeleteChecker.cpp (Results 1 – 5 of 5)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3
# 37785fed 25-Mar-2024 Discookie <viktor.cseh@ericsson.com>

[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'

[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@gmail.com>
Co-authored-by: whisperity <whisperity@gmail.com>

show more ...


Revision tags: llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# 18f219c5 01-Jan-2024 Balazs Benics <benicsbalazs@gmail.com>

[analyzer][NFC] Cleanup BugType lazy-init patterns (#76655)

Cleanup most of the lazy-init `BugType` legacy.
Some will be preserved, as those are slightly more complicated to
refactor.

Notice, t

[analyzer][NFC] Cleanup BugType lazy-init patterns (#76655)

Cleanup most of the lazy-init `BugType` legacy.
Some will be preserved, as those are slightly more complicated to
refactor.

Notice, that the default category for `BugType` is `LogicError`. I
omitted setting this explicitly where I could.

Please, actually have a look at the diff. I did this manually, and we
rarely check the bug type descriptions and stuff in tests, so the
testing might be shallow on this one.

show more ...


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4
# 564e0165 30-Oct-2023 Discookie <viktor.cseh@ericsson.com>

[clang][analyzer] Do not analyze opaque types in CXXDeleteChecker (#70638)

While inheritance can only be expressed if the class has a definition,
in this case one of the types might be opaque to th

[clang][analyzer] Do not analyze opaque types in CXXDeleteChecker (#70638)

While inheritance can only be expressed if the class has a definition,
in this case one of the types might be opaque to the analyzer.

Fixes a crash encountered while analyzing LLVM.

show more ...


Revision tags: llvmorg-17.0.3
# 0e246bb6 09-Oct-2023 Viktor Cseh <viktor.cseh@ericsson.com>

[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 di

[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

show more ...


# 71ae858c 06-Oct-2023 Viktor Cseh <viktor.cseh@ericsson.com>

[clang][analyzer] Rename DeleteWithNonVirtualDtorChecker to CXXDeleteChecker

This rename is done in a separate commit to preserve `git blame`,
before implementing CXXArrayDeleteChecker and refactori

[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

show more ...