blob: ce1284f75da7e02ea5c89feaf93144e5f713e047 [file] [log] [blame]
Dominic Chen184c6242017-03-03 18:02:02 +00001// RUN: %clang_analyze_cc1 -analyzer-checker=osx.coreFoundation.containers.PointerSizedValues -triple x86_64-apple-darwin -verify %s
Andy Gibbsc6e68da2012-10-19 12:44:48 +00002// expected-no-diagnostics
Jordan Rose968a1b52012-10-16 00:47:25 +00003
4typedef const struct __CFAllocator * CFAllocatorRef;
5typedef const struct __CFArray * CFArrayRef;
6typedef const struct __CFDictionary * CFDictionaryRef;
7typedef const struct __CFSet * CFSetRef;
8
9extern const CFAllocatorRef kCFAllocatorDefault;
10
11// Unexpected declarations for these:
12CFArrayRef CFArrayCreate(CFAllocatorRef);
13CFDictionaryRef CFDictionaryCreate(CFAllocatorRef);
14CFSetRef CFSetCreate(CFAllocatorRef);
15
16void testNoCrash() {
17 (void)CFArrayCreate(kCFAllocatorDefault);
18 (void)CFDictionaryCreate(kCFAllocatorDefault);
19 (void)CFSetCreate(kCFAllocatorDefault);
20}