Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / CFContainers-invalid.c
bloba86c3d807edced1d7d63953a78712a394dd8dbf9
1 // RUN: %clang_analyze_cc1 -analyzer-checker=osx.coreFoundation.containers.PointerSizedValues -triple x86_64-apple-darwin -verify %s
2 // expected-no-diagnostics
4 typedef const struct __CFAllocator * CFAllocatorRef;
5 typedef const struct __CFArray * CFArrayRef;
6 typedef const struct __CFDictionary * CFDictionaryRef;
7 typedef const struct __CFSet * CFSetRef;
9 extern const CFAllocatorRef kCFAllocatorDefault;
11 // Unexpected declarations for these:
12 CFArrayRef CFArrayCreate(CFAllocatorRef);
13 CFDictionaryRef CFDictionaryCreate(CFAllocatorRef);
14 CFSetRef CFSetCreate(CFAllocatorRef);
16 void testNoCrash(void) {
17 (void)CFArrayCreate(kCFAllocatorDefault);
18 (void)CFDictionaryCreate(kCFAllocatorDefault);
19 (void)CFSetCreate(kCFAllocatorDefault);