aboutsummaryrefslogtreecommitdiffhomepage
path: root/build_tools/iwyu.osx.imp
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-04-20 23:00:54 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-04-26 15:02:22 -0700
commit1f06e5f0b9ee483053b987c9cab9f1f5fce2590c (patch)
tree8ebebff055f4aa184e7d7b021190ab01d9376992 /build_tools/iwyu.osx.imp
parentdaa217f533490e0b9bc4113a143e8f38de922b7a (diff)
add better support for IWYU and fix things
Remove the "make iwyu" build target. Move the functionality into the recently introduced lint.fish script. Fix a lot, but not all, of the include-what-you-use errors. Specifically, it fixes all of the IWYU errors on my OS X server but only removes some of them on my Ubuntu 14.04 server. Fixes #2957
Diffstat (limited to 'build_tools/iwyu.osx.imp')
-rw-r--r--build_tools/iwyu.osx.imp97
1 files changed, 97 insertions, 0 deletions
diff --git a/build_tools/iwyu.osx.imp b/build_tools/iwyu.osx.imp
new file mode 100644
index 00000000..cad467cd
--- /dev/null
+++ b/build_tools/iwyu.osx.imp
@@ -0,0 +1,97 @@
+# Map file for the include-what-you-use tool on OS X. For some reason
+# the version installed by HomeBrew doesn't have useful mappings for the
+# system provided private headers.
+[
+ { include: ["<sys/_pthread/_pthread_once_t.h>", "private", "<pthread.h>", "public"] },
+ { include: ["<sys/_pthread/_pthread_mutex_t.h>", "private", "<pthread.h>", "public"] },
+ { include: ["<sys/_pthread/_pthread_rwlock_t.h>", "private", "<pthread.h>", "public"] },
+ { include: ["<sys/_pthread/_pthread_mutexattr_t.h>", "private", "<pthread.h>", "public"] },
+ { include: ["<sys/_pthread/_pthread_cond_t.h>", "private", "<pthread.h>", "public"] },
+ { include: ["<sys/_pthread/_pthread_t.h>", "private", "<pthread.h>", "public"] },
+ { include: ["<sys/_pthread/_pthread_key_t.h>", "private", "<pthread.h>", "public"] },
+ { include: ["<sys/_types/_posix_vdisable.h>", "private", "<pthread.h>", "public"] },
+ { include: ["<sys/_types/_time_t.h>", "private", "<time.h>", "public"] },
+ { include: ["<sys/_types/_suseconds_t.h>", "private", "<time.h>", "public"] },
+ { include: ["<sys/_types/_suseconds_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/errno.h>", "private", "<errno.h>", "public"] },
+ { include: ["<sys/unistd.h>", "private", "<unistd.h>", "public"] },
+ { include: ["<_wctype.h>", "private", "<wctype.h>", "public"] },
+ { include: ["<sys/fcntl.h>", "private", "<fcntl.h>", "public"] },
+ { include: ["<sys/_types/_seek_set.h>", "private", "<fcntl.h>", "public"] },
+ { include: ["<sys/_types/_mbstate_t.h>", "private", "<wchar.h>", "public"] },
+ { include: ["<iosfwd>", "private", "<string>", "public"] },
+ { include: ["<sys/_types/_s_ifmt.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_size_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_size_t.h>", "private", "<stdlib.h>", "public"] },
+ { include: ["<sys/_types/_mode_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_pid_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_fd_def.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_fd_isset.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_fd_set.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_fd_zero.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_timeval.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_uid_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<_types/_intmax_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<_types/_uintmax_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<_types/_uint8_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_int32_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<_types/_uint64_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_uintptr_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_dev_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_ino_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_va_list.h>", "private", "<stdio.h>", "public"] },
+ { include: ["<__functional_base>", "private", "<memory>", "public"] },
+ { include: ["<__functional_base>", "private", "<vector>", "public"] },
+ { include: ["<__functional_base>", "private", "<string>", "public"] },
+ { include: ["<__tree>", "private", "<map>", "public"] },
+ { include: ["<__tree>", "private", "<set>", "public"] },
+ { include: ["<_types/_uint32_t.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_va_list.h>", "private", "<sys/types.h>", "public"] },
+ { include: ["<sys/_types/_sigset_t.h>", "private", "<signal.h>", "public"] },
+ { include: ["<sys/signal.h>", "private", "<signal.h>", "public"] },
+ { include: ["<strings.h>", "private", "<string.h>", "public"] },
+ { include: ["<sys/termios.h>", "private", "<termios.h>", "public"] },
+ { include: ["<sys/ttycom.h>", "private", "<termios.h>", "public"] },
+ { include: ["<sys/syslimits.h>", "private", "<limits.h>", "public"] },
+ { include: ["<i386/limits.h>", "private", "<limits.h>", "public"] },
+ { include: ["<sys/_types/_wint_t.h>", "private", "<stddef.h>", "public"] },
+ { include: ["<sys/_select.h>", "private", "<select.h>", "public"] },
+ { include: ["<sys/cdefs.h>", "private", "<unistd.h>", "public"] },
+ { include: ["<istream>", "private", "<iostream>", "public"] },
+ { include: ["<sys/_endian.h>", "private", "<netinet/in.h>", "public"] },
+ { include: ["<sys/_types/_timespec.h>", "private", "<time.h>", "public"] },
+ { include: ["<sys/spawn.h>", "private", "<spawn.h>", "public"] },
+ { include: ["<sys/dirent.h>", "private", "<dirent.h>", "public"] },
+# { include: ["<>", "private", "<>", "public"] },
+
+ { symbol: ["NULL", "private", "<stddef.h>", "public"] },
+ { symbol: ["NULL", "private", "<stdlib.h>", "public"] },
+ { symbol: ["NULL", "private", "<stdio.h>", "public"] },
+ { symbol: ["NULL", "private", "<unistd.h>", "public"] },
+ { symbol: ["off_t", "private", "<unistd.h>", "public"] },
+ { symbol: ["size_t", "private", "<unistd.h>", "public"] },
+ { symbol: ["size_t", "private", "<stddef.h>", "public"] },
+ { symbol: ["size_t", "private", "<stdlib.h>", "public"] },
+ { symbol: ["off_t", "private", "<sys/types.h>", "public"] },
+ { symbol: ["size_t", "private", "<sys/types.h>", "public"] },
+ { symbol: ["ssize_t", "private", "<sys/types.h>", "public"] },
+ { symbol: ["intptr_t", "private", "<unistd.h>", "public"] },
+ { symbol: ["ssize_t", "private", "<unistd.h>", "public"] },
+ { symbol: ["gid_t", "private", "<unistd.h>", "public"] },
+ { symbol: ["uid_t", "private", "<unistd.h>", "public"] },
+ { symbol: ["pid_t", "private", "<unistd.h>", "public"] },
+ { symbol: ["pid_t", "private", "<sys/types.h>", "public"] },
+ { symbol: ["uid_t", "private", "<sys/types.h>", "public"] },
+ { symbol: ["gid_t", "private", "<sys/types.h>", "public"] },
+ { symbol: ["uint32_t", "private", "<sys/types.h>", "public"] },
+ { symbol: ["uint32_t", "private", "<stdint.h>", "public"] },
+ { symbol: ["intptr_t", "private", "<stdint.h>", "public"] },
+ { symbol: ["size_t", "private", "<stdint.h>", "public"] },
+ { symbol: ["tparm", "private", "<ncurses.h>", "public"] },
+ { symbol: ["ERR", "private", "<ncurses.h>", "public"] },
+ { symbol: ["select", "private", "<sys/select.h>", "public"] },
+ { symbol: ["_LIBCPP_VERSION", "private", "<stddef.h>", "public"] },
+ { symbol: ["_LIBCPP_VERSION", "private", "<unistd.h>", "public"] },
+ { symbol: ["MB_CUR_MAX", "private", "<xlocale.h>", "public"] },
+ { symbol: ["MB_CUR_MAX", "private", "<stdlib.h>", "public"] },
+]