brintos

brintos / llvm-project-archived public Read only

0
0
Text · 739 B · a86c3d8 Raw
21 lines · c
1// RUN: %clang_analyze_cc1 -analyzer-checker=osx.coreFoundation.containers.PointerSizedValues -triple x86_64-apple-darwin -verify %s2// expected-no-diagnostics3 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(void) {17  (void)CFArrayCreate(kCFAllocatorDefault);18  (void)CFDictionaryCreate(kCFAllocatorDefault);19  (void)CFSetCreate(kCFAllocatorDefault);20}21