[clang] [analyzer] Clean up bug types in CallAndMessageChecker (PR #156073)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 2 04:14:39 PDT 2025


================
@@ -31,34 +31,38 @@ namespace {
 class CallAndMessageChecker
     : public Checker<check::PreObjCMessage, check::ObjCMessageNil,
                      check::PreCall> {
-  mutable std::unique_ptr<BugType> BT_call_null;
-  mutable std::unique_ptr<BugType> BT_call_undef;
-  mutable std::unique_ptr<BugType> BT_cxx_call_null;
-  mutable std::unique_ptr<BugType> BT_cxx_call_undef;
-  mutable std::unique_ptr<BugType> BT_call_arg;
-  mutable std::unique_ptr<BugType> BT_cxx_delete_undef;
-  mutable std::unique_ptr<BugType> BT_msg_undef;
-  mutable std::unique_ptr<BugType> BT_objc_prop_undef;
-  mutable std::unique_ptr<BugType> BT_objc_subscript_undef;
-  mutable std::unique_ptr<BugType> BT_msg_arg;
-  mutable std::unique_ptr<BugType> BT_msg_ret;
-  mutable std::unique_ptr<BugType> BT_call_few_args;
+  const BugType BT_call_null{
----------------
NagyDonat wrote:

Good idea, done in https://github.com/llvm/llvm-project/pull/156073/commits/79ea51c2c78671d6ec9b8c7b8297230b6368d6cc

https://github.com/llvm/llvm-project/pull/156073


More information about the cfe-commits mailing list