[clang] [analyzer] Conversion to CheckerFamily: StackAddrEscapeChecker (PR #151136)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 30 05:35:36 PDT 2025
=?utf-8?q?DonĂ¡t?= Nagy <donat.nagy at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/151136 at github.com>
================
@@ -28,23 +28,20 @@ using namespace ento;
namespace {
class StackAddrEscapeChecker
- : public Checker<check::PreCall, check::PreStmt<ReturnStmt>,
- check::EndFunction> {
+ : public CheckerFamily<check::PreCall, check::PreStmt<ReturnStmt>,
+ check::EndFunction> {
mutable IdentifierInfo *dispatch_semaphore_tII = nullptr;
- mutable std::unique_ptr<BugType> BT_stackleak;
- mutable std::unique_ptr<BugType> BT_returnstack;
- mutable std::unique_ptr<BugType> BT_capturedstackasync;
- mutable std::unique_ptr<BugType> BT_capturedstackret;
public:
- enum CheckKind {
- CK_StackAddrEscapeChecker,
- CK_StackAddrAsyncEscapeChecker,
- CK_NumCheckKinds
- };
+ StringRef getDebugTag() const override { return "StackAddrEscapeChecker"; }
- bool ChecksEnabled[CK_NumCheckKinds] = {false};
- CheckerNameRef CheckNames[CK_NumCheckKinds];
+ CheckerFrontend StackAddrEscape, StackAddrAsyncEscape;
----------------
steakhal wrote:
You are right. IDK if it was part of it in the past or was discussed somewhere.
Nevertheless, the vast majority of the cases declare separately in the static analyzer, so we should probably stick with that.
https://github.com/llvm/llvm-project/pull/151136
More information about the cfe-commits
mailing list