aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-26 21:04:07 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-26 21:04:07 +0000
commite198116646fcfe6b7e8f3665f3365a648141d6bd (patch)
treecc030d47d2e88e8b4787491f8ab35044eb672a9b /lib/Analysis/CFRefCount.cpp
parent4b2d3f7bcc4df31157df443af1b80bcaa9b58bba (diff)
Refine some grammar in the retain/release diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp36
1 files changed, 15 insertions, 21 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index dbfe418da7..8f694fa946 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -2189,7 +2189,7 @@ namespace {
: CFRefBug(tf, "use-after-release") {}
const char* getDescription() const {
- return "Reference-counted object is used after it is released.";
+ return "Reference-counted object is used after it is released";
}
};
@@ -2199,8 +2199,8 @@ namespace {
const char* getDescription() const {
return "Incorrect decrement of the reference count of a "
- "CoreFoundation object: "
- "The object is not owned at this point by the caller.";
+ "Core Foundation object ("
+ "the object is not owned at this point by the caller)";
}
};
@@ -2329,16 +2329,16 @@ void CFRefCount::RegisterChecks(BugReporter& BR) {
}
static const char* Msgs[] = {
- "Code is compiled in garbage collection only mode" // GC only
- " (the bug occurs with garbage collection enabled).",
-
- "Code is compiled without garbage collection.", // No GC.
-
- "Code is compiled for use with and without garbage collection (GC)."
- " The bug occurs with GC enabled.", // Hybrid, with GC.
-
- "Code is compiled for use with and without garbage collection (GC)."
- " The bug occurs in non-GC mode." // Hyrbird, without GC/
+ // GC only
+ "Code is compiled to only use garbage collection",
+ // No GC.
+ "Code is compiled to not use reference counts and not garbage collection",
+ // Hybrid, with GC.
+ "Code is compiled to use either garbage collection (GC) or reference counts"
+ " (non-GC). The bug occurs with GC enabled",
+ // Hybrid, without GC
+ "Code is compiled to use either garbage collection (GC) or reference counts"
+ " (non-GC). The bug occurs in non-GC mode"
};
std::pair<const char**,const char**> CFRefReport::getExtraDescriptiveText() {
@@ -2537,14 +2537,8 @@ PathDiagnosticPiece* CFRefReport::VisitNode(const ExplodedNode<GRState>* N,
else
os << "Reference count incremented.";
- if (unsigned Count = CurrV.getCount()) {
- os << " The object now has +" << Count;
-
- if (Count > 1)
- os << " retain counts.";
- else
- os << " retain count.";
- }
+ if (unsigned Count = CurrV.getCount())
+ os << " The object now has a +" << Count << " retain count.";
if (PrevV.getKind() == RefVal::Released) {
assert(TF.isGCEnabled() && CurrV.getCount() > 0);