summaryrefslogtreecommitdiffstats
path: root/iwyu
diff options
context:
space:
mode:
Diffstat (limited to 'iwyu')
-rw-r--r--iwyu/htop.imp33
-rwxr-xr-xiwyu/run_iwyu.sh15
2 files changed, 48 insertions, 0 deletions
diff --git a/iwyu/htop.imp b/iwyu/htop.imp
new file mode 100644
index 0000000..e2fc72b
--- /dev/null
+++ b/iwyu/htop.imp
@@ -0,0 +1,33 @@
+[
+ { include: ["<curses.h>", "private", "\"ProvideCurses.h\"", "public"] },
+ { include: ["<ncurses.h>", "private", "\"ProvideCurses.h\"", "public"] },
+ { include: ["<ncurses/curses.h>", "private", "\"ProvideCurses.h\"", "public"] },
+ { include: ["<ncurses/ncurses.h>", "private", "\"ProvideCurses.h\"", "public"] },
+
+ { include: ["<term.h>", "private", "\"ProvideTerm.h\"", "public"] },
+ { include: ["<ncurses/term.h>", "private", "\"ProvideTerm.h\"", "public"] },
+ { include: ["<ncursesw/term.h>", "private", "\"ProvideTerm.h\"", "public"] },
+
+ { include: ["<libunwind-x86_64.h>", "private", "<libunwind.h>", "public"] },
+ { include: ["\"ibunwind-x86_64.h\"", "private", "<libunwind.h>", "public"] },
+
+ { include: ["<bits/types/struct_tm.h>", "private", "<time.h>", "public"] },
+
+ { include: ["<bits/getopt_core.h>", "private", "<unistd.h>", "public"] },
+
+ { include: ["<sys/dirent.h>", "private", "<dirent.h>", "public"] },
+
+ { include: ["<sys/signal.h>", "private", "<signal.h>", "public"] },
+
+ { include: ["<sys/_stdarg.h>", "private", "<stdarg.h>", "public"] },
+
+ { include: ["<sys/limits.h>", "private", "<limits.h>", "public"] },
+
+ { include: ["<x86/_inttypes.h>", "private", "<inttypes.h>", "public"] },
+
+ { include: ["<linux/capability.h>", "private", "<sys/capability.h>", "public"] },
+
+ { include: ["<bits/mman-shared.h>", "private", "<sys/mman.h>", "public"] },
+
+ { include: ["<bits/types/struct_sched_param.h>", "private", "<sched.h>", "public"] },
+]
diff --git a/iwyu/run_iwyu.sh b/iwyu/run_iwyu.sh
new file mode 100755
index 0000000..8456240
--- /dev/null
+++ b/iwyu/run_iwyu.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+SCRIPT=$(readlink -f "$0")
+SCRIPTDIR=$(dirname "$SCRIPT")
+SOURCEDIR="$SCRIPTDIR/.."
+
+PKG_NL3=$(pkg-config --cflags libnl-3.0)
+
+IWYU=${IWYU:-iwyu}
+
+cd "$SOURCEDIR" || exit
+
+./configure CC=clang CXX=clang++ --enable-silent-rules
+make clean
+make -k -s CC="$IWYU" CFLAGS="-Xiwyu --no_comments -Xiwyu --no_fwd_decl -Xiwyu --mapping_file='$SCRIPTDIR/htop.imp' $PKG_NL3"