From: Chris Lattner Date: Mon, 29 Oct 2007 04:18:06 +0000 (+0000) Subject: Add prototype info for __builtin_memcpy, reducing #diagnostics from 37 to 34 on X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52735a0339dd31750251a13aac73677693410c9d;p=clang Add prototype info for __builtin_memcpy, reducing #diagnostics from 37 to 34 on PR1750 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43435 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/AST/Builtins.cpp b/AST/Builtins.cpp index 3fb3faf85f..5a470ff950 100644 --- a/AST/Builtins.cpp +++ b/AST/Builtins.cpp @@ -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; diff --git a/include/clang/AST/Builtins.def b/include/clang/AST/Builtins.def index d26d7cf5ad..546c8cf3e9 100644 --- a/include/clang/AST/Builtins.def +++ b/include/clang/AST/Builtins.def @@ -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