Jordan Rose | bc9e5ff | 2012-10-16 00:47:25 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -analyze -analyzer-checker=osx.coreFoundation.containers.PointerSizedValues -triple x86_64-apple-darwin -verify %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Jordan Rose | bc9e5ff | 2012-10-16 00:47:25 +0000 | [diff] [blame] | 3 | |
| 4 | typedef const struct __CFAllocator * CFAllocatorRef; |
| 5 | typedef const struct __CFArray * CFArrayRef; |
| 6 | typedef const struct __CFDictionary * CFDictionaryRef; |
| 7 | typedef const struct __CFSet * CFSetRef; |
| 8 | |
| 9 | extern const CFAllocatorRef kCFAllocatorDefault; |
| 10 | |
| 11 | // Unexpected declarations for these: |
| 12 | CFArrayRef CFArrayCreate(CFAllocatorRef); |
| 13 | CFDictionaryRef CFDictionaryCreate(CFAllocatorRef); |
| 14 | CFSetRef CFSetCreate(CFAllocatorRef); |
| 15 | |
| 16 | void testNoCrash() { |
| 17 | (void)CFArrayCreate(kCFAllocatorDefault); |
| 18 | (void)CFDictionaryCreate(kCFAllocatorDefault); |
| 19 | (void)CFSetCreate(kCFAllocatorDefault); |
| 20 | } |