[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC] cleanup of #includes
From: |
Justus Winter |
Subject: |
[RFC] cleanup of #includes |
Date: |
Thu, 14 Nov 2013 12:41:30 +0100 |
Hi :)
I've been playing with include-what-you-use [0] (iwyu in
Debian). Unfortunately iwyu depends on clang-3.{3,4} which is not
currently avaliable on Debian/Hurd, so I'm using a horrible^Wingenious
hack that runs iwyu on Linux while the actual build runs on Hurd.
0: https://code.google.com/p/include-what-you-use/
iwyu is somewhat aggressive by default, e.g. it likes to pull
mach_port_allocate from mach-shortcuts.h. It can be tuned however, by
means of mapping files that map symbols or private header to public
headers. But, this makes the whole process a lot more manual than I
anticipated. So before I put any more time into this, I'd like to hear
your oppinion on the whole thing.
As an example of a patch generated here is a patch that fixes the
includes in libihash/ihash.c.
1. Do you consider the comment describing which symbols are pulled
from the header as noise or worthwile information?
2. Do you consider it too noisy to include mach-shortcuts.h instead of
mach.h for stuff like mach_port_allocate?
3. libihash/ihash.c includes <hurd/ihash.h>. Shouldn't it include
"ihash.h" instead, so that it gets the local version instead of the
one in /usr/include?
Cheers,
Justus
- [RFC] cleanup of #includes,
Justus Winter <=
- [PATCH] libihash: cleanup the #includes, Justus Winter, 2013/11/14
- Re: [RFC] cleanup of #includes, Svante Signell, 2013/11/14
- Re: [RFC] cleanup of #includes, Neal H. Walfield, 2013/11/14
- Re: [RFC] cleanup of #includes, Svante Signell, 2013/11/14
- Re: [RFC] cleanup of #includes, Neal H. Walfield, 2013/11/14
- Re: [RFC] cleanup of #includes, Samuel Thibault, 2013/11/14
- [PATCH] Clean up the included header files, Justus Winter, 2013/11/15
- Re: [PATCH] Clean up the included header files, Samuel Thibault, 2013/11/16
Re: [RFC] cleanup of #includes, Richard Braun, 2013/11/14