[analyzer] Retain release: drop the line number info from the leak
message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151657 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index 3ae76e0..2350298 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -2257,15 +2257,14 @@
   // Fill in the description of the bug.
   Description.clear();
   llvm::raw_string_ostream os(Description);
-  unsigned AllocLine = SMgr.getExpansionLineNumber(AllocStmt->getLocStart());
   os << "Potential leak ";
   if (GCEnabled)
     os << "(when using garbage collection) ";
-  os << "of an object allocated on line " << AllocLine;
+  os << "of an object";
 
   // FIXME: AllocBinding doesn't get populated for RegionStore yet.
   if (AllocBinding)
-    os << " and stored into '" << AllocBinding->getString() << '\'';
+    os << " stored into '" << AllocBinding->getString() << '\'';
 
   addVisitor(new CFRefLeakReportVisitor(sym, GCEnabled, Log));
 }
diff --git a/test/Analysis/plist-output-alternate.m b/test/Analysis/plist-output-alternate.m
index 23a260a..d619a7a 100644
--- a/test/Analysis/plist-output-alternate.m
+++ b/test/Analysis/plist-output-alternate.m
@@ -990,7 +990,7 @@
 // CHECK: <string>Object leaked: object allocated and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
 // CHECK:     </dict>
 // CHECK:    </array>
-// CHECK:    <key>description</key><string>Potential leak of an object allocated on line 53 and stored into &apos;value&apos;</string>
+// CHECK:    <key>description</key><string>Potential leak of an object stored into &apos;value&apos;</string>
 // CHECK:    <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
 // CHECK:    <key>type</key><string>Leak</string>
 // CHECK:   <key>location</key>
diff --git a/test/Analysis/retain-release-gc-only.m b/test/Analysis/retain-release-gc-only.m
index 4e1b846..b12e1e0 100644
--- a/test/Analysis/retain-release-gc-only.m
+++ b/test/Analysis/retain-release-gc-only.m
@@ -279,7 +279,7 @@
 
 @implementation TestReturnNotOwnedWhenExpectedOwned
 - (NSString*)newString {
-  NSString *s = [NSString stringWithUTF8String:"hello"]; // expected-warning{{Potential leak (when using garbage collection) of an object allocated}}
+  NSString *s = [NSString stringWithUTF8String:"hello"]; // expected-warning{{Potential leak (when using garbage collection) of an object}}
   CFRetain(s);
   return s;
 }
diff --git a/test/Analysis/retain-release.m b/test/Analysis/retain-release.m
index bb32635..1ca4876 100644
--- a/test/Analysis/retain-release.m
+++ b/test/Analysis/retain-release.m
@@ -1468,7 +1468,7 @@
     while (error_to_dump != ((void*)0)) {
         CFDictionaryRef info;
 
-        info = CFErrorCopyUserInfo(error_to_dump); // expected-warning{{Potential leak of an object allocated on line}}
+        info = CFErrorCopyUserInfo(error_to_dump); // expected-warning{{Potential leak of an object}}
 
         if (info != ((void*)0)) {
         }