[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 28 15:51:30 PDT 2018


rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/Headers/mm_malloc.h:42
 extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
+extern "C" void(free)(void *ptr);
+extern "C" void *(malloc)(size_t size) __attribute__((__malloc__));
----------------
Add a space before `(free)`, please. (Here and above.)


================
Comment at: test/CXX/except/except.spec/Inputs/clang/mm_malloc.h:2
+// missing throw() is allowed in this case as we are in a system header.
+// This is a redeclaration possibly from glibc.
+extern "C" void free(void *ptr);
----------------
Do you mean this might be a redeclaration of a glibc function? Presumably this file is supposed to correspond to our builtin header, not a glibc one.


https://reviews.llvm.org/D43871





More information about the cfe-commits mailing list