[libcxx-commits] [lld] [llvm] [clang] [mlir] [libcxx] [flang] [analyzer][NFC] Cleanup BugType lazy-init patterns (PR #76655)
Balazs Benics via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 1 10:08:04 PST 2024
================
@@ -31,14 +31,14 @@ class InvalidatedIteratorChecker
check::PreStmt<ArraySubscriptExpr>,
check::PreStmt<MemberExpr>> {
- std::unique_ptr<BugType> InvalidatedBugType;
+ const BugType InvalidatedBugType{this, "Iterator invalidated",
+ "Misuse of STL APIs"};
void verifyAccess(CheckerContext &C, const SVal &Val) const;
- void reportBug(const StringRef &Message, const SVal &Val,
- CheckerContext &C, ExplodedNode *ErrNode) const;
-public:
- InvalidatedIteratorChecker();
+ void reportBug(const StringRef &Message, const SVal &Val, CheckerContext &C,
----------------
steakhal wrote:
Followup PR for the analyzer-wide refactor: #76688
https://github.com/llvm/llvm-project/pull/76655
More information about the libcxx-commits
mailing list