summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2014-04-09 01:39:22 +0000
committerJordan Rose <jordan_rose@apple.com>2014-04-09 01:39:22 +0000
commit0675c8739530565653532c0a1e1709a744400b5d (patch)
tree53020fd53ac2780636d6934792500ab9067f8b15 /clang/test/Analysis
parent20b075e5265555d8f923abe5128400fe66d22c1f (diff)
downloadbcm5719-llvm-0675c8739530565653532c0a1e1709a744400b5d.tar.gz
bcm5719-llvm-0675c8739530565653532c0a1e1709a744400b5d.zip
[analyzer] When checking Foundation method calls, match the selectors exactly.
This also includes some infrastructure to make it easier to build multi-argument selectors, rather than trying to use string matching on each piece. There's a bit more setup code, but less cost at runtime. PR18908 llvm-svn: 205827
Diffstat (limited to 'clang/test/Analysis')
-rw-r--r--clang/test/Analysis/NSContainers.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Analysis/NSContainers.m b/clang/test/Analysis/NSContainers.m
index 3d3603acb34..4b349264568 100644
--- a/clang/test/Analysis/NSContainers.m
+++ b/clang/test/Analysis/NSContainers.m
@@ -284,3 +284,11 @@ void testLiteralsNonNil() {
clang_analyzer_eval(!!@{}); // expected-warning{{TRUE}}
}
+@interface NSMutableArray (MySafeAdd)
+- (void)addObject:(id)obj safe:(BOOL)safe;
+@end
+
+void testArrayCategory(NSMutableArray *arr) {
+ [arr addObject:0 safe:1]; // no-warning
+}
+
OpenPOWER on IntegriCloud