jdoerfert marked 2 inline comments as done. jdoerfert added inline comments.
================ Comment at: include/clang/Basic/Builtins.def:942 LIBBUILTIN(alloca, "v*z", "f", "stdlib.h", ALL_GNU_LANGUAGES) +LIBBUILTIN(qsort_r, "", "fC<3,-1,-1,4>", "stdlib.h", ALL_GNU_LANGUAGES) // POSIX string.h ---------------- arichardson wrote: > qsort_r callback argument order is different on Linux, macOS and FreeBSD so > those constants can't be hardcoded: > Linux: > `void qsort_r(void *base, size_t nmemb, size_t size, int (*compar)(const void > *, const void *, void *), void *arg);` > FreeBSD: > `void qsort_r(void *base, size_t nmemb, size_t size, void *thunk, int > (*compar)(void *, const void *, const void*));` > macos: > `void qsort_r(void *base, size_t nel, size_t width, void *thunk, int > (*compar)(void *, const void *, const void *));` Really good point. I'll remove qsort_r in the next version I guess. If we find another similar function we can extend the encoding to sth like: `C:(<3,-1,-1,4>|<5,4,-1,-1>)` which represents both possibilities. The `Builtin::Context::performsCallback(...)` will then need to check which is appropriate based on the type of the actual declaration. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/ https://reviews.llvm.org/D55483 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits