blob: c0a599335bc8eaa6d4f4110454a7caf6632705bc [file] [log] [blame]
Ted Kremenek5216ad72009-02-14 03:16:10 +00001// RUN: clang -analyze -checker-cfref -analyzer-store-basic -verify %s
2
3typedef const void * CFTypeRef;
4typedef double CFTimeInterval;
5typedef CFTimeInterval CFAbsoluteTime;
6typedef const struct __CFAllocator * CFAllocatorRef;
7typedef const struct __CFDate * CFDateRef;
8
9extern CFDateRef CFDateCreate(CFAllocatorRef allocator, CFAbsoluteTime at);
10CFAbsoluteTime CFAbsoluteTimeGetCurrent(void);
11
12void f(void) {
13 CFAbsoluteTime t = CFAbsoluteTimeGetCurrent();
14 CFTypeRef vals[] = { CFDateCreate(0, t) }; // no-warning
15}
16
17CFTypeRef global;
18
19void g(void) {
20 CFAbsoluteTime t = CFAbsoluteTimeGetCurrent();
21 global = CFDateCreate(0, t); // no-warning
22}