]> granicus.if.org Git - clang/commitdiff
PR3443: Add stpcpy builtin (plus a few other related builtins). Yes,
authorEli Friedman <eli.friedman@gmail.com>
Fri, 5 Jun 2009 08:20:10 +0000 (08:20 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Fri, 5 Jun 2009 08:20:10 +0000 (08:20 +0000)
we're still missing a mechanism to disable these in strict mode, but
that's not a new issue.

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

include/clang/AST/Builtins.def

index 1baee6ddd80646c400b74554e53b779272f76e6e..c2f4061c5d789b46de3c0b76902a701a8adf8db2 100644 (file)
@@ -369,6 +369,11 @@ LIBBUILTIN(vsprintf, "ic*cC*a",   "fP:1:", "stdio.h")
 // Non-C library functions
 // FIXME: Non-C-standard stuff shouldn't be builtins in non-GNU mode!
 LIBBUILTIN(alloca, "v*z",         "f",     "stdlib.h")
+// POSIX string.h
+LIBBUILTIN(stpcpy, "c*c*cC*",     "f",     "string.h")
+LIBBUILTIN(stpncpy, "c*c*cC*z",   "f",     "string.h")
+LIBBUILTIN(strdup, "c*cC*",       "f",     "string.h")
+LIBBUILTIN(strndup, "c*cC*z",     "f",     "string.h")
 // POSIX strings.h
 LIBBUILTIN(index, "c*cC*i",       "f",     "strings.h")
 LIBBUILTIN(rindex, "c*cC*i",      "f",     "strings.h")