From: Ted Kremenek Date: Mon, 16 Jun 2008 19:53:46 +0000 (+0000) Subject: Update test case to use -pedantic (makes the test case more clear). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b5484acebc2783be187f44d9f15632875ecb47c;p=clang Update test case to use -pedantic (makes the test case more clear). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52349 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/CFString.c b/test/Analysis/CFString.c index 9f59ebf6ac..cb53bb1c66 100644 --- a/test/Analysis/CFString.c +++ b/test/Analysis/CFString.c @@ -1,4 +1,4 @@ -// RUN: clang -checker-cfref -verify %s +// RUN: clang -checker-cfref -pedantic -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from @@ -9,14 +9,25 @@ // both svelte and portable to non-Mac platforms. //===----------------------------------------------------------------------===// +typedef unsigned long UInt32; +typedef unsigned char Boolean; typedef signed long CFIndex; +typedef const void * CFTypeRef; typedef const struct __CFString * CFStringRef; -typedef struct {} CFArrayCallBacks; +typedef struct { CFIndex location; } CFRange; +typedef const struct __CFAllocator * CFAllocatorRef; +extern void CFRelease(CFTypeRef cf); +typedef Boolean (*CFArrayEqualCallBack)(const void *value1, const void *value2); +typedef struct { CFArrayEqualCallBack equal; } CFArrayCallBacks; extern const CFArrayCallBacks kCFTypeArrayCallBacks; typedef const struct __CFArray * CFArrayRef; typedef struct __CFArray * CFMutableArrayRef; +extern CFMutableArrayRef CFArrayCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFArrayCallBacks *callBacks); extern const void *CFArrayGetValueAtIndex(CFArrayRef theArray, CFIndex idx); +extern void CFArrayAppendValue(CFMutableArrayRef theArray, const void *value); +typedef UInt32 CFStringEncoding; enum { kCFStringEncodingMacRoman = 0, kCFStringEncodingWindowsLatin1 = 0x0500, kCFStringEncodingISOLatin1 = 0x0201, kCFStringEncodingNextStepLatin = 0x0B01, kCFStringEncodingASCII = 0x0600, kCFStringEncodingUnicode = 0x0100, kCFStringEncodingUTF8 = 0x08000100, kCFStringEncodingNonLossyASCII = 0x0BFF , kCFStringEncodingUTF16 = 0x0100, kCFStringEncodingUTF16BE = 0x10000100, kCFStringEncodingUTF16LE = 0x14000100, kCFStringEncodingUTF32 = 0x0c000100, kCFStringEncodingUTF32BE = 0x18000100, kCFStringEncodingUTF32LE = 0x1c000100 }; +extern CFStringRef CFStringCreateWithCString(CFAllocatorRef alloc, const char *cStr, CFStringEncoding encoding); //===----------------------------------------------------------------------===// // Test cases.