[PATCH] D42085: Add va_start()/va_copy()/va_end to Builtins.def

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 12:19:09 PST 2018

thakis created this revision.
thakis added a reviewer: hans.

That way, clang suggests including stdarg.h when these are used in C files.



Index: include/clang/Basic/Builtins.def
--- include/clang/Basic/Builtins.def
+++ include/clang/Basic/Builtins.def
@@ -802,6 +802,10 @@
 LIBBUILTIN(_setjmpex, "iJ", "fj",   "setjmpex.h", ALL_MS_LANGUAGES)
 // C99 library functions
+// C99 stdarg.h
+LIBBUILTIN(va_start, "vA.",       "fnt",   "stdarg.h", ALL_LANGUAGES)
+LIBBUILTIN(va_end, "vA",          "fn",    "stdarg.h", ALL_LANGUAGES)
+LIBBUILTIN(va_copy, "vAA",        "fn",    "stdarg.h", ALL_LANGUAGES)
 // C99 stdlib.h
 LIBBUILTIN(abort, "v",            "fr",    "stdlib.h", ALL_LANGUAGES)
 LIBBUILTIN(calloc, "v*zz",        "f",     "stdlib.h", ALL_LANGUAGES)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42085.129897.patch
Type: text/x-patch
Size: 689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180115/5bfa899c/attachment-0001.bin>

More information about the cfe-commits mailing list