]> granicus.if.org Git - clang/commitdiff
Attempt to fix Sema/builtin-object-size.c after r218258
authorHans Wennborg <hans@hanshq.net>
Tue, 23 Sep 2014 00:02:36 +0000 (00:02 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 23 Sep 2014 00:02:36 +0000 (00:02 +0000)
The type of size_t varies between targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218288 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/builtin-object-size.c

index b878c65017c0f0167a3b945f5545e5efd94c5d92..e4b65608816794d997c7eaa9d6439792fed10d06 100644 (file)
@@ -27,7 +27,7 @@ void f4(const char *fmt, ...) {
 }
 
 // rdar://18334276
-typedef unsigned long size_t;
+typedef __typeof__(sizeof(int)) size_t;
 void * memcset(void *restrict dst, int src, size_t n);
 void * memcpy(void *restrict dst, const void *restrict src, size_t n);