blob: 939af06b7658496a13dd47d1ae490a0bf0d5fb76 [file] [log] [blame]
Jordan Rosebc9e5ff2012-10-16 00:47:25 +00001// RUN: %clang_cc1 -analyze -analyzer-checker=osx.coreFoundation.containers.PointerSizedValues -triple x86_64-apple-darwin -verify %s
2
3typedef const struct __CFAllocator * CFAllocatorRef;
4typedef const struct __CFArray * CFArrayRef;
5typedef const struct __CFDictionary * CFDictionaryRef;
6typedef const struct __CFSet * CFSetRef;
7
8extern const CFAllocatorRef kCFAllocatorDefault;
9
10// Unexpected declarations for these:
11CFArrayRef CFArrayCreate(CFAllocatorRef);
12CFDictionaryRef CFDictionaryCreate(CFAllocatorRef);
13CFSetRef CFSetCreate(CFAllocatorRef);
14
15void testNoCrash() {
16 (void)CFArrayCreate(kCFAllocatorDefault);
17 (void)CFDictionaryCreate(kCFAllocatorDefault);
18 (void)CFSetCreate(kCFAllocatorDefault);
19}