diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-04-23 01:42:25 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-04-23 01:42:25 +0000 |
commit | 7467f065337bcc13cacf9be81c7b0f0e9e3a1329 (patch) | |
tree | 9d41bec53d5f64f7730b380eb35b0b9463e8109b /clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | |
parent | 723e129aa2c07191222f25e26160a547d02b7deb (diff) | |
download | bcm5719-llvm-7467f065337bcc13cacf9be81c7b0f0e9e3a1329.tar.gz bcm5719-llvm-7467f065337bcc13cacf9be81c7b0f0e9e3a1329.zip |
[analyzer] RetainCountChecker: Clean up path notes for autorelease.
No functionality change.
<rdar://problem/13710586>
llvm-svn: 180075
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 4c630190837..7f83d1d3712 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -326,7 +326,7 @@ void RefVal::print(raw_ostream &Out) const { break; case RefVal::ErrorOverAutorelease: - Out << "Over autoreleased"; + Out << "Over-autoreleased"; break; case RefVal::ErrorReturnedNotOwned: @@ -1662,10 +1662,10 @@ namespace { class OverAutorelease : public CFRefBug { public: OverAutorelease() - : CFRefBug("Object sent -autorelease too many times") {} + : CFRefBug("Object autoreleased too many times") {} const char *getDescription() const { - return "Object sent -autorelease too many times"; + return "Object autoreleased too many times"; } }; @@ -2050,7 +2050,7 @@ PathDiagnosticPiece *CFRefReportVisitor::VisitNode(const ExplodedNode *N, return 0; assert(PrevV.getAutoreleaseCount() < CurrV.getAutoreleaseCount()); - os << "Object sent -autorelease message"; + os << "Object autoreleased"; break; } @@ -3554,10 +3554,12 @@ RetainCountChecker::handleAutoreleaseCounts(ProgramStateRef state, if (N) { SmallString<128> sbuf; llvm::raw_svector_ostream os(sbuf); - os << "Object over-autoreleased: object was sent -autorelease "; + os << "Object was autoreleased "; if (V.getAutoreleaseCount() > 1) - os << V.getAutoreleaseCount() << " times "; - os << "but the object has a +" << V.getCount() << " retain count"; + os << V.getAutoreleaseCount() << " times but the object "; + else + os << "but "; + os << "has a +" << V.getCount() << " retain count"; if (!overAutorelease) overAutorelease.reset(new OverAutorelease()); |