summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2019-01-10 18:16:25 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2019-01-10 18:16:25 +0000
commitcf5ae62b3d7291ab7cf73ce9bdd9eca4a59191ab (patch)
treeaf5173cb1c65c3affa3a688e6730c29bbeff29e5
parent3cd5b128daf2b432d5adab97ed60d6d54ba129f4 (diff)
[analyzer] Update the category name for RetainCountChecker reports
..now that it includes OSObjects rdar://46509986 Differential Revision: https://reviews.llvm.org/D56404 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350869 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h2
-rw-r--r--lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp6
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp42
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h13
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp44
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.h23
-rw-r--r--lib/StaticAnalyzer/Core/CommonBugCategories.cpp4
-rw-r--r--test/Analysis/Inputs/expected-plists/edges-new.mm.plist6
-rw-r--r--test/Analysis/Inputs/expected-plists/objc-arc.m.plist12
-rw-r--r--test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist4
-rw-r--r--test/Analysis/Inputs/expected-plists/plist-output-alternate.m.plist2
-rw-r--r--test/Analysis/Inputs/expected-plists/plist-output.m.plist2
-rw-r--r--test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist54
-rw-r--r--test/Analysis/inlining/Inputs/expected-plists/path-notes.m.plist2
14 files changed, 107 insertions, 109 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h b/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h
index 0e80e7bc19..d07525661a 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h
@@ -16,7 +16,7 @@ namespace clang {
namespace categories {
extern const char * const CoreFoundationObjectiveC;
extern const char * const LogicError;
- extern const char * const MemoryCoreFoundationObjectiveC;
+ extern const char * const MemoryRefCount;
extern const char * const MemoryError;
extern const char * const UnixAPI;
}
diff --git a/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp b/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
index eeff47ba82..00a912f27a 100644
--- a/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
+++ b/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
@@ -757,15 +757,15 @@ ObjCDeallocChecker::ObjCDeallocChecker()
MissingReleaseBugType.reset(
new BugType(this, "Missing ivar release (leak)",
- categories::MemoryCoreFoundationObjectiveC));
+ categories::MemoryRefCount));
ExtraReleaseBugType.reset(
new BugType(this, "Extra ivar release",
- categories::MemoryCoreFoundationObjectiveC));
+ categories::MemoryRefCount));
MistakenDeallocBugType.reset(
new BugType(this, "Mistaken dealloc",
- categories::MemoryCoreFoundationObjectiveC));
+ categories::MemoryRefCount));
}
void ObjCDeallocChecker::initIdentifierInfoAndSelectors(
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
index 28873a465f..371221229b 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
@@ -39,19 +39,19 @@ ProgramStateRef removeRefBinding(ProgramStateRef State, SymbolRef Sym) {
return State->remove<RefBindings>(Sym);
}
-class UseAfterRelease : public CFRefBug {
+class UseAfterRelease : public RefCountBug {
public:
UseAfterRelease(const CheckerBase *checker)
- : CFRefBug(checker, "Use-after-release") {}
+ : RefCountBug(checker, "Use-after-release") {}
const char *getDescription() const override {
return "Reference-counted object is used after it is released";
}
};
-class BadRelease : public CFRefBug {
+class BadRelease : public RefCountBug {
public:
- BadRelease(const CheckerBase *checker) : CFRefBug(checker, "Bad release") {}
+ BadRelease(const CheckerBase *checker) : RefCountBug(checker, "Bad release") {}
const char *getDescription() const override {
return "Incorrect decrement of the reference count of an object that is "
@@ -59,30 +59,30 @@ public:
}
};
-class DeallocNotOwned : public CFRefBug {
+class DeallocNotOwned : public RefCountBug {
public:
DeallocNotOwned(const CheckerBase *checker)
- : CFRefBug(checker, "-dealloc sent to non-exclusively owned object") {}
+ : RefCountBug(checker, "-dealloc sent to non-exclusively owned object") {}
const char *getDescription() const override {
return "-dealloc sent to object that may be referenced elsewhere";
}
};
-class OverAutorelease : public CFRefBug {
+class OverAutorelease : public RefCountBug {
public:
OverAutorelease(const CheckerBase *checker)
- : CFRefBug(checker, "Object autoreleased too many times") {}
+ : RefCountBug(checker, "Object autoreleased too many times") {}
const char *getDescription() const override {
return "Object autoreleased too many times";
}
};
-class ReturnedNotOwnedForOwned : public CFRefBug {
+class ReturnedNotOwnedForOwned : public RefCountBug {
public:
ReturnedNotOwnedForOwned(const CheckerBase *checker)
- : CFRefBug(checker, "Method should return an owned object") {}
+ : RefCountBug(checker, "Method should return an owned object") {}
const char *getDescription() const override {
return "Object with a +0 retain count returned to caller where a +1 "
@@ -90,9 +90,9 @@ public:
}
};
-class Leak : public CFRefBug {
+class Leak : public RefCountBug {
public:
- Leak(const CheckerBase *checker, StringRef name) : CFRefBug(checker, name) {
+ Leak(const CheckerBase *checker, StringRef name) : RefCountBug(checker, name) {
// Leaks should not be reported if they are post-dominated by a sink.
setSuppressOnSink(true);
}
@@ -414,14 +414,14 @@ void RetainCountChecker::checkPostCall(const CallEvent &Call,
checkSummary(*Summ, Call, C);
}
-CFRefBug *
+RefCountBug *
RetainCountChecker::getLeakWithinFunctionBug(const LangOptions &LOpts) const {
if (!leakWithinFunction)
leakWithinFunction.reset(new Leak(this, "Leak"));
return leakWithinFunction.get();
}
-CFRefBug *
+RefCountBug *
RetainCountChecker::getLeakAtReturnBug(const LangOptions &LOpts) const {
if (!leakAtReturn)
leakAtReturn.reset(new Leak(this, "Leak of returned object"));
@@ -816,7 +816,7 @@ void RetainCountChecker::processNonLeakError(ProgramStateRef St,
if (!N)
return;
- CFRefBug *BT;
+ RefCountBug *BT;
switch (ErrorKind) {
default:
llvm_unreachable("Unhandled error.");
@@ -838,7 +838,7 @@ void RetainCountChecker::processNonLeakError(ProgramStateRef St,
}
assert(BT);
- auto report = llvm::make_unique<CFRefReport>(
+ auto report = llvm::make_unique<RefCountReport>(
*BT, C.getASTContext().getLangOpts(), N, Sym);
report->addRange(ErrorRange);
C.emitReport(std::move(report));
@@ -1042,7 +1042,7 @@ ExplodedNode * RetainCountChecker::checkReturnWithRetEffect(const ReturnStmt *S,
ExplodedNode *N = C.addTransition(state, Pred, &ReturnOwnLeakTag);
if (N) {
const LangOptions &LOpts = C.getASTContext().getLangOpts();
- auto R = llvm::make_unique<CFRefLeakReport>(
+ auto R = llvm::make_unique<RefLeakReport>(
*getLeakAtReturnBug(LOpts), LOpts, N, Sym, C);
C.emitReport(std::move(R));
}
@@ -1070,7 +1070,7 @@ ExplodedNode * RetainCountChecker::checkReturnWithRetEffect(const ReturnStmt *S,
if (!returnNotOwnedForOwned)
returnNotOwnedForOwned.reset(new ReturnedNotOwnedForOwned(this));
- auto R = llvm::make_unique<CFRefReport>(
+ auto R = llvm::make_unique<RefCountReport>(
*returnNotOwnedForOwned, C.getASTContext().getLangOpts(), N, Sym);
C.emitReport(std::move(R));
}
@@ -1274,7 +1274,7 @@ RetainCountChecker::handleAutoreleaseCounts(ProgramStateRef state,
overAutorelease.reset(new OverAutorelease(this));
const LangOptions &LOpts = Ctx.getASTContext().getLangOpts();
- auto R = llvm::make_unique<CFRefReport>(*overAutorelease, LOpts, N, Sym,
+ auto R = llvm::make_unique<RefCountReport>(*overAutorelease, LOpts, N, Sym,
os.str());
Ctx.emitReport(std::move(R));
}
@@ -1323,12 +1323,12 @@ RetainCountChecker::processLeaks(ProgramStateRef state,
I = Leaked.begin(), E = Leaked.end(); I != E; ++I) {
const LangOptions &LOpts = Ctx.getASTContext().getLangOpts();
- CFRefBug *BT = Pred ? getLeakWithinFunctionBug(LOpts)
+ RefCountBug *BT = Pred ? getLeakWithinFunctionBug(LOpts)
: getLeakAtReturnBug(LOpts);
assert(BT && "BugType not initialized.");
Ctx.emitReport(
- llvm::make_unique<CFRefLeakReport>(*BT, LOpts, N, *I, Ctx));
+ llvm::make_unique<RefLeakReport>(*BT, LOpts, N, *I, Ctx));
}
}
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
index 95b1a3a6c5..87633feecc 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
@@ -251,10 +251,10 @@ class RetainCountChecker
check::RegionChanges,
eval::Assume,
eval::Call > {
- mutable std::unique_ptr<CFRefBug> useAfterRelease, releaseNotOwned;
- mutable std::unique_ptr<CFRefBug> deallocNotOwned;
- mutable std::unique_ptr<CFRefBug> overAutorelease, returnNotOwnedForOwned;
- mutable std::unique_ptr<CFRefBug> leakWithinFunction, leakAtReturn;
+ mutable std::unique_ptr<RefCountBug> useAfterRelease, releaseNotOwned;
+ mutable std::unique_ptr<RefCountBug> deallocNotOwned;
+ mutable std::unique_ptr<RefCountBug> overAutorelease, returnNotOwnedForOwned;
+ mutable std::unique_ptr<RefCountBug> leakWithinFunction, leakAtReturn;
mutable std::unique_ptr<RetainSummaryManager> Summaries;
public:
@@ -268,10 +268,9 @@ public:
RetainCountChecker() {}
+ RefCountBug *getLeakWithinFunctionBug(const LangOptions &LOpts) const;
- CFRefBug *getLeakWithinFunctionBug(const LangOptions &LOpts) const;
-
- CFRefBug *getLeakAtReturnBug(const LangOptions &LOpts) const;
+ RefCountBug *getLeakAtReturnBug(const LangOptions &LOpts) const;
RetainSummaryManager &getSummaryManager(ASTContext &Ctx) const {
// FIXME: We don't support ARC being turned on and off during one analysis.
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
index 1f370fc301..b4f58b55a3 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
@@ -189,12 +189,12 @@ namespace clang {
namespace ento {
namespace retaincountchecker {
-class CFRefReportVisitor : public BugReporterVisitor {
+class RefCountReportVisitor : public BugReporterVisitor {
protected:
SymbolRef Sym;
public:
- CFRefReportVisitor(SymbolRef sym) : Sym(sym) {}
+ RefCountReportVisitor(SymbolRef sym) : Sym(sym) {}
void Profile(llvm::FoldingSetNodeID &ID) const override {
static int x = 0;
@@ -211,9 +211,9 @@ public:
BugReport &BR) override;
};
-class CFRefLeakReportVisitor : public CFRefReportVisitor {
+class RefLeakReportVisitor : public RefCountReportVisitor {
public:
- CFRefLeakReportVisitor(SymbolRef sym) : CFRefReportVisitor(sym) {}
+ RefLeakReportVisitor(SymbolRef sym) : RefCountReportVisitor(sym) {}
std::shared_ptr<PathDiagnosticPiece> getEndPath(BugReporterContext &BRC,
const ExplodedNode *N,
@@ -303,7 +303,7 @@ annotateConsumedSummaryMismatch(const ExplodedNode *N,
}
std::shared_ptr<PathDiagnosticPiece>
-CFRefReportVisitor::VisitNode(const ExplodedNode *N,
+RefCountReportVisitor::VisitNode(const ExplodedNode *N,
BugReporterContext &BRC, BugReport &BR) {
const SourceManager &SM = BRC.getSourceManager();
@@ -548,14 +548,14 @@ static AllocationInfo GetAllocationSite(ProgramStateManager &StateMgr,
}
std::shared_ptr<PathDiagnosticPiece>
-CFRefReportVisitor::getEndPath(BugReporterContext &BRC,
+RefCountReportVisitor::getEndPath(BugReporterContext &BRC,
const ExplodedNode *EndN, BugReport &BR) {
BR.markInteresting(Sym);
return BugReporterVisitor::getDefaultEndPath(BRC, EndN, BR);
}
std::shared_ptr<PathDiagnosticPiece>
-CFRefLeakReportVisitor::getEndPath(BugReporterContext &BRC,
+RefLeakReportVisitor::getEndPath(BugReporterContext &BRC,
const ExplodedNode *EndN, BugReport &BR) {
// Tell the BugReporterContext to report cases when the tracked symbol is
@@ -637,21 +637,23 @@ CFRefLeakReportVisitor::getEndPath(BugReporterContext &BRC,
return std::make_shared<PathDiagnosticEventPiece>(L, os.str());
}
-CFRefReport::CFRefReport(CFRefBug &D, const LangOptions &LOpts, ExplodedNode *n,
- SymbolRef sym, bool registerVisitor)
+RefCountReport::RefCountReport(RefCountBug &D, const LangOptions &LOpts,
+ ExplodedNode *n, SymbolRef sym,
+ bool registerVisitor)
: BugReport(D, D.getDescription(), n), Sym(sym) {
if (registerVisitor)
- addVisitor(llvm::make_unique<CFRefReportVisitor>(sym));
+ addVisitor(llvm::make_unique<RefCountReportVisitor>(sym));
}
-CFRefReport::CFRefReport(CFRefBug &D, const LangOptions &LOpts, ExplodedNode *n,
- SymbolRef sym, StringRef endText)
+RefCountReport::RefCountReport(RefCountBug &D, const LangOptions &LOpts,
+ ExplodedNode *n, SymbolRef sym,
+ StringRef endText)
: BugReport(D, D.getDescription(), endText, n) {
- addVisitor(llvm::make_unique<CFRefReportVisitor>(sym));
+ addVisitor(llvm::make_unique<RefCountReportVisitor>(sym));
}
-void CFRefLeakReport::deriveParamLocation(CheckerContext &Ctx, SymbolRef sym) {
+void RefLeakReport::deriveParamLocation(CheckerContext &Ctx, SymbolRef sym) {
const SourceManager& SMgr = Ctx.getSourceManager();
if (!sym->getOriginRegion())
@@ -670,7 +672,7 @@ void CFRefLeakReport::deriveParamLocation(CheckerContext &Ctx, SymbolRef sym) {
}
}
-void CFRefLeakReport::deriveAllocLocation(CheckerContext &Ctx,
+void RefLeakReport::deriveAllocLocation(CheckerContext &Ctx,
SymbolRef sym) {
// Most bug reports are cached at the location where they occurred.
// With leaks, we want to unique them by the location where they were
@@ -713,7 +715,7 @@ void CFRefLeakReport::deriveAllocLocation(CheckerContext &Ctx,
UniqueingDecl = AllocNode->getLocationContext()->getDecl();
}
-void CFRefLeakReport::createDescription(CheckerContext &Ctx) {
+void RefLeakReport::createDescription(CheckerContext &Ctx) {
assert(Location.isValid() && UniqueingDecl && UniqueingLocation.isValid());
Description.clear();
llvm::raw_string_ostream os(Description);
@@ -729,10 +731,10 @@ void CFRefLeakReport::createDescription(CheckerContext &Ctx) {
}
}
-CFRefLeakReport::CFRefLeakReport(CFRefBug &D, const LangOptions &LOpts,
- ExplodedNode *n, SymbolRef sym,
- CheckerContext &Ctx)
- : CFRefReport(D, LOpts, n, sym, false) {
+RefLeakReport::RefLeakReport(RefCountBug &D, const LangOptions &LOpts,
+ ExplodedNode *n, SymbolRef sym,
+ CheckerContext &Ctx)
+ : RefCountReport(D, LOpts, n, sym, false) {
deriveAllocLocation(Ctx, sym);
if (!AllocBinding)
@@ -740,5 +742,5 @@ CFRefLeakReport::CFRefLeakReport(CFRefBug &D, const LangOptions &LOpts,
createDescription(Ctx);
- addVisitor(llvm::make_unique<CFRefLeakReportVisitor>(sym));
+ addVisitor(llvm::make_unique<RefLeakReportVisitor>(sym));
}
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.h b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.h
index f27027ab62..9f796abe8e 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.h
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.h
@@ -24,41 +24,39 @@ namespace clang {
namespace ento {
namespace retaincountchecker {
-class CFRefBug : public BugType {
+class RefCountBug : public BugType {
protected:
- CFRefBug(const CheckerBase *checker, StringRef name)
- : BugType(checker, name, categories::MemoryCoreFoundationObjectiveC) {}
+ RefCountBug(const CheckerBase *checker, StringRef name)
+ : BugType(checker, name, categories::MemoryRefCount) {}
public:
-
- // FIXME: Eventually remove.
virtual const char *getDescription() const = 0;
virtual bool isLeak() const { return false; }
};
-class CFRefReport : public BugReport {
+class RefCountReport : public BugReport {
protected:
SymbolRef Sym;
public:
- CFRefReport(CFRefBug &D, const LangOptions &LOpts,
+ RefCountReport(RefCountBug &D, const LangOptions &LOpts,
ExplodedNode *n, SymbolRef sym,
bool registerVisitor = true);
- CFRefReport(CFRefBug &D, const LangOptions &LOpts,
+ RefCountReport(RefCountBug &D, const LangOptions &LOpts,
ExplodedNode *n, SymbolRef sym,
StringRef endText);
llvm::iterator_range<ranges_iterator> getRanges() override {
- const CFRefBug& BugTy = static_cast<CFRefBug&>(getBugType());
+ const RefCountBug& BugTy = static_cast<RefCountBug&>(getBugType());
if (!BugTy.isLeak())
return BugReport::getRanges();
return llvm::make_range(ranges_iterator(), ranges_iterator());
}
};
-class CFRefLeakReport : public CFRefReport {
+class RefLeakReport : public RefCountReport {
const MemRegion* AllocBinding;
const Stmt *AllocStmt;
@@ -71,9 +69,8 @@ class CFRefLeakReport : public CFRefReport {
void createDescription(CheckerContext &Ctx);
public:
- CFRefLeakReport(CFRefBug &D, const LangOptions &LOpts,
- ExplodedNode *n, SymbolRef sym,
- CheckerContext &Ctx);
+ RefLeakReport(RefCountBug &D, const LangOptions &LOpts, ExplodedNode *n,
+ SymbolRef sym, CheckerContext &Ctx);
PathDiagnosticLocation getLocation(const SourceManager &SM) const override {
assert(Location.isValid());
diff --git a/lib/StaticAnalyzer/Core/CommonBugCategories.cpp b/lib/StaticAnalyzer/Core/CommonBugCategories.cpp
index 421dfa48c9..cdae3ef011 100644
--- a/lib/StaticAnalyzer/Core/CommonBugCategories.cpp
+++ b/lib/StaticAnalyzer/Core/CommonBugCategories.cpp
@@ -14,8 +14,8 @@ namespace clang { namespace ento { namespace categories {
const char * const CoreFoundationObjectiveC = "Core Foundation/Objective-C";
const char * const LogicError = "Logic error";
-const char * const MemoryCoreFoundationObjectiveC =
- "Memory (Core Foundation/Objective-C)";
+const char * const MemoryRefCount =
+ "Memory (Core Foundation/Objective-C/OSObject)";
const char * const MemoryError = "Memory error";
const char * const UnixAPI = "Unix API";
}}}
diff --git a/test/Analysis/Inputs/expected-plists/edges-new.mm.plist b/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
index 449050d595..bcb659c0b3 100644
--- a/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
+++ b/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
@@ -2118,7 +2118,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;value&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -11217,7 +11217,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;foo&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -21063,7 +21063,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;foo&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
diff --git a/test/Analysis/Inputs/expected-plists/objc-arc.m.plist b/test/Analysis/Inputs/expected-plists/objc-arc.m.plist
index 966ea9ac09..650da09090 100644
--- a/test/Analysis/Inputs/expected-plists/objc-arc.m.plist
+++ b/test/Analysis/Inputs/expected-plists/objc-arc.m.plist
@@ -311,7 +311,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;date&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -842,7 +842,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;obj5&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -988,7 +988,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;obj6&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -1422,7 +1422,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;date&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -1733,7 +1733,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object of type &apos;CFStringRef&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -1927,7 +1927,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;o&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
diff --git a/test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist b/test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist
index b5b26d050e..b778e98bff 100644
--- a/test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist
+++ b/test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist
@@ -1266,7 +1266,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object of type &apos;NSNumber *&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -1306,4 +1306,4 @@
<string>/Volumes/Transcend/code/monorepo/llvm-project/clang/test/Analysis/objc-radar17039661.m</string>
</array>
</dict>
-</plist> \ No newline at end of file
+</plist>
diff --git a/test/Analysis/Inputs/expected-plists/plist-output-alternate.m.plist b/test/Analysis/Inputs/expected-plists/plist-output-alternate.m.plist
index 966d5a7bce..aedf062672 100644
--- a/test/Analysis/Inputs/expected-plists/plist-output-alternate.m.plist
+++ b/test/Analysis/Inputs/expected-plists/plist-output-alternate.m.plist
@@ -1484,7 +1484,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;value&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
diff --git a/test/Analysis/Inputs/expected-plists/plist-output.m.plist b/test/Analysis/Inputs/expected-plists/plist-output.m.plist
index a2658e0ff0..cafa9f3b94 100644
--- a/test/Analysis/Inputs/expected-plists/plist-output.m.plist
+++ b/test/Analysis/Inputs/expected-plists/plist-output.m.plist
@@ -2371,7 +2371,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;foo&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
diff --git a/test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist b/test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist
index 13b654a19c..b2b90adad1 100644
--- a/test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist
+++ b/test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist
@@ -103,7 +103,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;leaked&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -224,7 +224,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;leaked&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -570,7 +570,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;leaked&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -769,7 +769,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;leaked&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -966,7 +966,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;leaked&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -1163,7 +1163,7 @@
</dict>
</array>
<key>description</key><string>Reference-counted object is used after it is released</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Use-after-release</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -1360,7 +1360,7 @@
</dict>
</array>
<key>description</key><string>Reference-counted object is used after it is released</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Use-after-release</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -1632,7 +1632,7 @@
</dict>
</array>
<key>description</key><string>Object autoreleased too many times</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Object autoreleased too many times</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -1830,7 +1830,7 @@
</dict>
</array>
<key>description</key><string>Object autoreleased too many times</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Object autoreleased too many times</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -1952,7 +1952,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;leaked&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -2075,7 +2075,7 @@
</dict>
</array>
<key>description</key><string>Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Method should return an owned object</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -2196,7 +2196,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;object&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak of returned object</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -2317,7 +2317,7 @@
</dict>
</array>
<key>description</key><string>Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Method should return an owned object</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -2438,7 +2438,7 @@
</dict>
</array>
<key>description</key><string>Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Method should return an owned object</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -2559,7 +2559,7 @@
</dict>
</array>
<key>description</key><string>Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Method should return an owned object</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -2680,7 +2680,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;result&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak of returned object</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -2876,7 +2876,7 @@
</dict>
</array>
<key>description</key><string>Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Method should return an owned object</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -2998,7 +2998,7 @@
</dict>
</array>
<key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Bad release</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -3119,7 +3119,7 @@
</dict>
</array>
<key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Bad release</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -3240,7 +3240,7 @@
</dict>
</array>
<key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Bad release</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -3361,7 +3361,7 @@
</dict>
</array>
<key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Bad release</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -3482,7 +3482,7 @@
</dict>
</array>
<key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Bad release</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -3840,7 +3840,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object of type &apos;MyObj *&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -4239,7 +4239,7 @@
</dict>
</array>
<key>description</key><string>Potential leak of an object stored into &apos;y&apos;</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Leak</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -4517,7 +4517,7 @@
</dict>
</array>
<key>description</key><string>Object autoreleased too many times</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Object autoreleased too many times</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -4715,7 +4715,7 @@
</dict>
</array>
<key>description</key><string>Object autoreleased too many times</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Object autoreleased too many times</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
@@ -4987,7 +4987,7 @@
</dict>
</array>
<key>description</key><string>Object autoreleased too many times</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Object autoreleased too many times</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->
diff --git a/test/Analysis/inlining/Inputs/expected-plists/path-notes.m.plist b/test/Analysis/inlining/Inputs/expected-plists/path-notes.m.plist
index 28477e4efe..1974e7ab25 100644
--- a/test/Analysis/inlining/Inputs/expected-plists/path-notes.m.plist
+++ b/test/Analysis/inlining/Inputs/expected-plists/path-notes.m.plist
@@ -1964,7 +1964,7 @@
</dict>
</array>
<key>description</key><string>Object autoreleased too many times</string>
- <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+ <key>category</key><string>Memory (Core Foundation/Objective-C/OSObject)</string>
<key>type</key><string>Object autoreleased too many times</string>
<key>check_name</key><string>osx.cocoa.RetainCount</string>
<!-- This hash is experimental and going to change! -->