summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-05-15 15:49:00 +0000
committerTed Kremenek <kremenek@apple.com>2009-05-15 15:49:00 +0000
commit3281977dbbc20c78f200e2810af75be2674132a0 (patch)
tree9eaca280947eb43255e38e34e51107adb7bd1462 /clang/test
parentdae2d9a852577b98f374742b14afeb8842066e25 (diff)
downloadbcm5719-llvm-3281977dbbc20c78f200e2810af75be2674132a0.tar.gz
bcm5719-llvm-3281977dbbc20c78f200e2810af75be2674132a0.zip
Fix crash when deriving the enclosing summary of a method whose first selector slot has a null IdentifierInfo*. This happens when analyzing Growl.
llvm-svn: 71857
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Analysis/retain-release.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Analysis/retain-release.m b/clang/test/Analysis/retain-release.m
index 74f5b90b4b2..ed9f6617047 100644
--- a/clang/test/Analysis/retain-release.m
+++ b/clang/test/Analysis/retain-release.m
@@ -619,6 +619,19 @@ void test_RDar6859457(RDar6859457 *x, void *bytes, NSUInteger dataLength) {
}
//===----------------------------------------------------------------------===//
+// Method name that has a null IdentifierInfo* for its first selector slot.
+// This test just makes sure that we handle it.
+//===----------------------------------------------------------------------===//
+
+@interface TestNullIdentifier
+@end
+
+@implementation TestNullIdentifier
++ (id):(int)x, ... {
+ return [[NSString alloc] init]; // expected-warning{{leak}}
+}
+
+//===----------------------------------------------------------------------===//
// Tests of ownership attributes.
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud