[cfe-commits] r65571 - /cfe/trunk/lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Thu Feb 26 13:04:07 PST 2009
Author: kremenek
Date: Thu Feb 26 15:04:07 2009
New Revision: 65571
URL: http://llvm.org/viewvc/llvm-project?rev=65571&view=rev
Log:
Refine some grammar in the retain/release diagnostics.
Modified:
cfe/trunk/lib/Analysis/CFRefCount.cpp
Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=65571&r1=65570&r2=65571&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Thu Feb 26 15:04:07 2009
@@ -2189,7 +2189,7 @@
: 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 @@
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 @@
}
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 @@
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);
More information about the cfe-commits
mailing list