summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/CGColorSpace.c
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-04 23:49:09 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-04 23:49:09 +0000
commitfc5d067ea092a9e960a091f5f55b93ec41e7ad2a (patch)
tree07628d31b86c912e2b64f8f562f3d8fecd3dd600 /clang/test/Analysis/CGColorSpace.c
parent400c040e01a5b946f50ec6e6395b14ed9a225477 (diff)
downloadbcm5719-llvm-fc5d067ea092a9e960a091f5f55b93ec41e7ad2a.tar.gz
bcm5719-llvm-fc5d067ea092a9e960a091f5f55b93ec41e7ad2a.zip
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). llvm-svn: 63796
Diffstat (limited to 'clang/test/Analysis/CGColorSpace.c')
-rw-r--r--clang/test/Analysis/CGColorSpace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Analysis/CGColorSpace.c b/clang/test/Analysis/CGColorSpace.c
index a46448c9179..b229bd2e246 100644
--- a/clang/test/Analysis/CGColorSpace.c
+++ b/clang/test/Analysis/CGColorSpace.c
@@ -7,8 +7,8 @@ extern CGColorSpaceRef CGColorSpaceRetain(CGColorSpaceRef space);
extern void CGColorSpaceRelease(CGColorSpaceRef space);
void f() {
- CGColorSpaceRef X = CGColorSpaceCreateDeviceRGB();
- CGColorSpaceRetain(X); // expected-warning{{leak}}
+ CGColorSpaceRef X = CGColorSpaceCreateDeviceRGB(); // expected-warning{{leak}}
+ CGColorSpaceRetain(X);
}
void fb() {
OpenPOWER on IntegriCloud