[all-commits] [llvm/llvm-project] ecac4e: [analyzer][NFC] Remove irrelevant overcomplicated ...
Donát Nagy via All-commits
all-commits at lists.llvm.org
Wed Jul 9 01:38:07 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ecac4e807b4dfd6e7efab1fe942d65763a2a1a89
https://github.com/llvm/llvm-project/commit/ecac4e807b4dfd6e7efab1fe942d65763a2a1a89
Author: Donát Nagy <donat.nagy at ericsson.com>
Date: 2025-07-09 (Wed, 09 Jul 2025)
Changed paths:
M clang/test/Analysis/new.cpp
R clang/test/Analysis/test-member-invalidation.cpp
Log Message:
-----------
[analyzer][NFC] Remove irrelevant overcomplicated test (#147536)
This commit removes the test file test-member-invalidation.cpp which was
recently introduced in 39bc0529b018a89b4b6a21aaabe240cd3a65c44d by
splitting off a test case from new.cpp.
In that commit I preserved that test in a slightly modified setting to
demonstrate that it wasn't broken by the change; but in this separate
commit I'm removing it because I don't think that it "deserves a place"
among our tests.
The primary issue is that this test examines the values of data members
of a deleted object -- which is irrelevant, because code that relies on
the value of these members should be reported as a use-after-free bug.
(In fact, cplusplus.NewDelete reports it as a use-after-free bug, and
the checker family `MallocChecker` sinks the execution path even if that
particular frontend is not enabled.)
Moreover, a comment claimed that this tests "Invalidate Region even in
case of default destructor" while in fact it tested a situaton where the
destructor is a plain declared-but-not-defined method. The invalidation
of `this` is done by the conservative evaluation, and we don't need this
overcomplicated test to validate that very basic 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