Ugh. Yet another alternative could be to enable misc-include-cleaner for
headers only, which would probably need a separate invocation of
clang-tidy.
I'm not sure if that will work at all though. If it doesn't, I'm out of
ideas... maybe we should simply go back to your original patch, in that
case, and you'll just get to "fix" things as they break (hopefully
infrequently) in the future.
I tried that, it didn't go well either:
/usr/local/google/home/pefoley/passt/util.h:140:5: error: no header providing "__BYTE_ORDER" is directly included [misc-include-cleaner,-warnings-as-errors]
9 | #if __BYTE_ORDER == __BIG_ENDIAN
| ^
/usr/local/google/home/pefoley/passt/util.h:140:21: error: no header providing "__BIG_ENDIAN" is directly included [misc-include-cleaner,-warnings-as-errors]
140 | #if __BYTE_ORDER == __BIG_ENDIAN
| ^
/usr/local/google/home/pefoley/passt/util.h:241:42: error: no header providing "iovec" is directly included [misc-include-cleaner,-warnings-as-errors]
9 | int write_remainder(int fd, const struct iovec *iov, size_t iovcnt, size_t skip);
| ^
/usr/local/google/home/pefoley/passt/util.h:254:35: error: no header providing "sa_family_t" is directly included [misc-include-cleaner,-warnings-as-errors]
9 | static inline const char *af_name(sa_family_t af)
|
I'm inclined to forget about trying to fix everything and just do the minimal set of changes to make the tooling happy with parsing the headers.
--
Stefano