[cfe-commits] r52349 - /cfe/trunk/test/Analysis/CFString.c
Ted Kremenek
kremenek at apple.com
Mon Jun 16 12:53:46 PDT 2008
Author: kremenek
Date: Mon Jun 16 14:53:46 2008
New Revision: 52349
URL: http://llvm.org/viewvc/llvm-project?rev=52349&view=rev
Log:
Update test case to use -pedantic (makes the test case more clear).
Modified:
cfe/trunk/test/Analysis/CFString.c
Modified: cfe/trunk/test/Analysis/CFString.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/CFString.c?rev=52349&r1=52348&r2=52349&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/CFString.c (original)
+++ cfe/trunk/test/Analysis/CFString.c Mon Jun 16 14:53:46 2008
@@ -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.
More information about the cfe-commits
mailing list