diff --git a/build_tools/iwyu.osx.imp b/build_tools/iwyu.osx.imp index ecb5a3a49..342d8f301 100644 --- a/build_tools/iwyu.osx.imp +++ b/build_tools/iwyu.osx.imp @@ -2,10 +2,27 @@ # the version installed by HomeBrew doesn't have useful mappings for the # system provided headers. This also has mappings for FreeBSD. [ + { include: ["<__functional_base>", private, "", public ] }, + { include: ["<__mutex_base>", private, "", public ] }, + { include: ["@<__algorithm/.*>", "private", "", "public"] }, + { include: ["@<__iterator/.*>", "private", "", "public"] }, + { include: ["@<__functional/.*>", "private", "", "public"] }, + { include: ["@<__memory/.*>", "private", "", "public"] }, + { include: ["@<__utility/.*>", "private", "", "public"] }, + { include: ["@<__chrono/.*>", "private", "", "public"] }, + { include: ["@<__numeric/.*>", "private", "", "public"] }, + { include: ["@<__random/.*>", "private", "", "public"] }, + { include: ["@<__locale/.*>", "private", "", "public"] }, + { include: ["@", "private", "", "public"] }, +# ratio false positive. See https://groups.google.com/g/include-what-you-use/c/OKVkkWUlx44 + { include: ["", "public", "", "public"] }, + { include: ["<__locale>", "private", "", "public"] }, + { include: ["<_ctype.h>", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, @@ -20,7 +37,7 @@ { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, - { include: ["", "private", "", "public"] }, + { include: ["", "public", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, @@ -51,7 +68,6 @@ { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, - { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, @@ -61,7 +77,7 @@ { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, - { include: ["", "private", "", "public"] }, + { include: ["", "public", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, @@ -70,22 +86,30 @@ { include: ["<__mutex_base>", "private", "", "public"] }, { include: ["<__hash_table>", "private", "", "public"] }, { include: ["<__hash_table>", "private", "", "public"] }, -# { include: ["<>", "private", "<>", "public"] }, - + { include: ['"../common.h"', "public", '"common.h"', "public"] }, + # We provide our own assert. including assert.h/cassert spoils it and redefines the macro + { symbol: ["assert", "private", '"common.h"', "public"] }, + { symbol: ["assert", "private", '"../common.h"', "public"] }, + { symbol: ["wcstring", "private", '"common.h"', "public"] }, + { symbol: ["wcstring", "private", '"../common.h"', "public"] }, + { symbol: ["wcstring_list_t", "private", '"common.h"', "public"] }, + { symbol: ["wcstring_list_t", "private", '"../common.h"', "public"] }, + { symbol: ["wcstring", "private", '"flog.h"', "public"] }, + { symbol: ["wcstring_list_t", "private", '"flog.h"', "public"] }, { symbol: ["size_t", "private", "", "public"] }, { symbol: ["mutex", "private", "", "public"] }, { symbol: ["sig_atomic_t", "private", "", "public"] }, { symbol: ["va_end", "private", "", "public"] }, { symbol: ["va_list", "private", "", "public"] }, { symbol: ["va_start", "private", "", "public"] }, - { symbol: ["NULL", "private", "", "public"] }, + { symbol: ["NULL", "private", "", "public"] }, { symbol: ["NULL", "private", "", "public"] }, { symbol: ["NULL", "private", "", "public"] }, { symbol: ["NULL", "private", "", "public"] }, { symbol: ["off_t", "private", "", "public"] }, { symbol: ["off_t", "private", "", "public"] }, - { symbol: ["size_t", "private", "", "public"] }, - { symbol: ["ssize_t", "private", "", "public"] }, + { symbol: ["size_t", "private", "", "public"] }, + { symbol: ["ssize_t", "private", "", "public"] }, { symbol: ["intptr_t", "private", "", "public"] }, { symbol: ["gid_t", "private", "", "public"] }, { symbol: ["uid_t", "private", "", "public"] }, @@ -94,16 +118,54 @@ { symbol: ["uid_t", "private", "", "public"] }, { symbol: ["gid_t", "private", "", "public"] }, { symbol: ["timeval", "private", "", "public"] }, - { symbol: ["__uint32_t", "private", "", "public"] }, - { symbol: ["uint32_t", "private", "", "public"] }, - { symbol: ["intptr_t", "private", "", "public"] }, + { symbol: ["__uint32_t", "private", "", "public"] }, + { symbol: ["uint32_t", "private", "", "public"] }, + { symbol: ["intptr_t", "private", "", "public"] }, { symbol: ["tparm", "private", "", "public"] }, - { symbol: ["tigetflag", "private", "", "public"] }, - { symbol: ["ERR", "private", "", "public"] }, - { symbol: ["OK", "private", "", "public"] }, { symbol: ["select", "private", "", "public"] }, - { symbol: ["_LIBCPP_VERSION", "private", "", "public"] }, + { symbol: ["_LIBCPP_VERSION", "private", "", "public"] }, { symbol: ["_LIBCPP_VERSION", "private", "", "public"] }, - { symbol: ["MB_CUR_MAX", "private", "", "public"] }, - { symbol: ["MB_CUR_MAX", "private", "", "public"] }, + { symbol: ["MB_CUR_MAX", "private", "", "public"] }, + { symbol: ["MB_LEN_MAX", "private", "", "public"] }, + { symbol: ["WEOF", "private", "", "public"] }, + { symbol: [ "std::declval", private, "", public ] }, + { symbol: [ "std::forward", private, "", public ] }, + { symbol: [ "std::move", private, "", public ] }, + { symbol: [ "std::nullptr_t", private, "", public ] }, + { symbol: [ "std::string", private, "", public ] }, + { symbol: [ "std::isalnum", private, "", public ] }, + { symbol: [ "std::toupper", private, "", public ] }, + { symbol: [ "sem_t", private, "", public ] }, + { symbol: [ "sem_post", private, "", public ] }, + { symbol: [ "sem_wait", private, "", public ] }, + { symbol: [ "sem_init", private, "", public ] }, + { symbol: [ "sem_destroy", private, "", public ] }, + { symbol: [ "FD_SETSIZE", private, "", public ] }, + { symbol: [ "locale_t", private, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "", public, "", public ] }, + { include: [ "<_xlocale.h>", private, "", public ] }, + ]