Fix the clang-wpa example.
[clang.git] / test / Analysis / rdar-6582778-basic-store.c
blobff32372f44fcf2fbb31a489e03b344d899c9b380
1 // RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=basic -verify %s
3 typedef const void * CFTypeRef;
4 typedef double CFTimeInterval;
5 typedef CFTimeInterval CFAbsoluteTime;
6 typedef const struct __CFAllocator * CFAllocatorRef;
7 typedef const struct __CFDate * CFDateRef;
9 extern CFDateRef CFDateCreate(CFAllocatorRef allocator, CFAbsoluteTime at);
10 CFAbsoluteTime CFAbsoluteTimeGetCurrent(void);
12 void f(void) {
13 CFAbsoluteTime t = CFAbsoluteTimeGetCurrent();
14 CFTypeRef vals[] = { CFDateCreate(0, t) }; // no-warning
17 CFTypeRef global;
19 void g(void) {
20 CFAbsoluteTime t = CFAbsoluteTimeGetCurrent();
21 global = CFDateCreate(0, t); // no-warning