[PATCH] D67867: Add few docs and implementation of strcpy and strcat.

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 17:53:10 PDT 2019


jyknight added inline comments.


================
Comment at: libc/include/ctype.h:16
+
+int isalnum(int c);
+
----------------
All the argument names should either be removed or put in the implementation namespace, e.g. named `__c`, etc. Since they're not specified by the standard, users can `#define` them to something else.

Removed is probably best.


================
Comment at: libc/include/gcc_clang_size_t.h.in:1
+//===------- Definition of size_t for gcc and clang compilations --------*-===//
+//
----------------
It would be good to be clear as to who is responsible for providing which headers.

Right now, clang expects to provide `stddef.h`, and thus size_t, so this shouldn't be provided by the libc.

I note that some bsd libcs remove some of clang's provided headers, and other libcs like musl want their headers in the wrong order (libc first, then clang builtins), but I don't know why they do that, or why they want to do that. And I think that's probably not a good thing to do for the llvm libc.


================
Comment at: libc/include/math.h:16
+
+double acos(double x);
+
----------------
Same issue with all these argument names.


================
Comment at: libc/include/null.h.in:1
+//===------------------- Definition of the NULL macro ------------------*-===//
+//
----------------
Same issue here -- duplicative of clang's stddef.h.


================
Comment at: libc/include/stdbool.h:1
+//===---------------- C standard library header stdbool.h ---------------*-===//
+//
----------------
Duplicative of clang's stdbool.h.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67867/new/

https://reviews.llvm.org/D67867





More information about the llvm-commits mailing list