Overhaul BugReporter interface and implementation. The new interface cleans up
the ownership of BugTypes and BugReports. Now BugReports are owned by BugTypes,
and BugTypes are owned by the BugReporter object.

The major functionality change in this patch is that reports are not immediately
emitted by a call to BugReporter::EmitWarning (now called EmitReport), but
instead of queued up in report "equivalence classes". When
BugReporter::FlushReports() is called, it emits one diagnostic per report
equivalence class. This provides a nice cleanup with the caching of reports as
well as enables the BugReporter engine to select the "best" path for reporting a
path-sensitive bug based on all the locations in the ExplodedGraph that the same
bug could occur.

Along with this patch, Leaks are now coalesced into a common equivalence class
by their allocation site, and the "summary" diagnostic for leaks now reports the
allocation site as the location of the bug (this may later be augmented to also
provide an example location where the leak occurs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63796 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/NSString.m b/test/Analysis/NSString.m
index b123d62..297c63d 100644
--- a/test/Analysis/NSString.m
+++ b/test/Analysis/NSString.m
@@ -109,12 +109,12 @@
 NSString* f7(NSString* s1, NSString* s2, NSString* s3) {
 
   NSString* s4 = (NSString*)
-    CFStringCreateWithFormat(kCFAllocatorDefault, 0,
+    CFStringCreateWithFormat(kCFAllocatorDefault, 0,  // expected-warning{{leak}}
                              (CFStringRef) __builtin___CFStringMakeConstantString("%@ %@ (%@)"), 
                              s1, s2, s3);
 
   CFRetain(s4);
-  return s4; // expected-warning{{leak}}
+  return s4;
 }
 
 NSMutableArray* f8() {