]> granicus.if.org Git - clang/commitdiff
Add prototype info for __builtin_memcpy, reducing #diagnostics from 37 to 34 on
authorChris Lattner <sabre@nondot.org>
Mon, 29 Oct 2007 04:18:06 +0000 (04:18 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 29 Oct 2007 04:18:06 +0000 (04:18 +0000)
PR1750

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

AST/Builtins.cpp
include/clang/AST/Builtins.def

index 3fb3faf85f96949bbc71db4e2d2aea964f20b3d6..5a470ff95069bd08df1b93ececeb87b53f7cef10 100644 (file)
@@ -130,6 +130,10 @@ static QualType DecodeTypeFromStr(const char *&Str, ASTContext &Context) {
     else
       Type = Context.CharTy;
     break;
+  case 'z':  // size_t.
+    assert(!Long && !Signed && !Unsigned && "Bad modifiers for 'z'!");
+    Type = Context.getSizeType();
+    break;
   case 'F':
     Type = Context.getCFConstantStringType();
     break;
index d26d7cf5ad46a907c1d9e7702161d7a702125ead..546c8cf3e9e1e34919dabc9bf503699063f2b052 100644 (file)
@@ -29,6 +29,7 @@
 //  i -> int
 //  f -> float
 //  d -> double
+//  z -> size_t
 //  F -> constant CFString
 //  V -> __builtin_va_list
 //  . -> "...".  This may only occur at the end of the function list.
@@ -63,5 +64,6 @@ BUILTIN(__builtin___CFStringMakeConstantString, "FC*cC*", "nc")
 BUILTIN(__builtin_va_start, "vV&.", "n")
 BUILTIN(__builtin_va_end, "vV&", "n")
 BUILTIN(__builtin_va_copy, "vV&V", "n")
+BUILTIN(__builtin_memcpy, "v*v*vC*z", "n")
 
 #undef BUILTIN