================
@@ -402,16 +449,19 @@ class MallocChecker
                   const char *NL, const char *Sep) const override;
 
 private:
-  mutable std::unique_ptr<BugType> BT_DoubleFree[CK_NumCheckKinds];
-  mutable std::unique_ptr<BugType> BT_DoubleDelete;
-  mutable std::unique_ptr<BugType> BT_Leak[CK_NumCheckKinds];
-  mutable std::unique_ptr<BugType> BT_UseFree[CK_NumCheckKinds];
-  mutable std::unique_ptr<BugType> BT_BadFree[CK_NumCheckKinds];
-  mutable std::unique_ptr<BugType> BT_FreeAlloca[CK_NumCheckKinds];
-  mutable std::unique_ptr<BugType> BT_MismatchedDealloc;
-  mutable std::unique_ptr<BugType> BT_OffsetFree[CK_NumCheckKinds];
-  mutable std::unique_ptr<BugType> BT_UseZerroAllocated[CK_NumCheckKinds];
-  mutable std::unique_ptr<BugType> BT_TaintedAlloc;
+  /// Helper method to handle the cases where there is no associated frontend
+  /// (just exit early) or the associated frontend is disabled (sink the
+  /// execution path and and then exit early). Intended to be called as
+  ///   if (handleNullOrDisabled(Frontend, C))
+  ///     return;
+  static bool handleNullOrDisabled(const CheckerFrontend *F,
----------------
NagyDonat wrote:

Note to self: As we discussed with @gamesh411, get rid of this helper method, 
inline its definition for better readability.

https://github.com/llvm/llvm-project/pull/147080
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to