mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
b47e23e17a
glibc marks various allocation functions as `throw()`. This addition hasn't been a problem until we tried to enable C++17, where clang started complaining that we were redeclaring functions with mismatched exception specifications. Peculiarly, glibc declares virtually everything we redeclare as `throw()`, but clang only complains about the mismatches for a particular subset of functions. The approach taken in this patch is to add another potentially defined macro to malloc_decls.h, `NOTHROW_MALLOC_DECL`. This macro works exactly like `MALLOC_DECL`, except that clients can define `NOTHROW_MALLOC_DECL` to add appropriate `throw()` specifiers when declaring functions at global scope, and thereby avoid mismatched exception specifications. Differential Revision: https://phabricator.services.mozilla.com/D44045 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
fallback.cpp | ||
Makefile.in | ||
malloc_decls.h | ||
moz.build | ||
mozjemalloc_types.h | ||
mozjemalloc.cpp | ||
mozjemalloc.h | ||
mozmemory_wrap.cpp | ||
mozmemory_wrap.h | ||
mozmemory.h | ||
Mutex.h | ||
rb.h | ||
replace_malloc_bridge.h | ||
replace_malloc.h | ||
Utils.h | ||
zone.c |