trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Hedstrom <>
Subject Re: RFC: self-contained headers
Date Sat, 02 Jul 2016 23:14:21 GMT

> On Jul 2, 2016, at 11:39 AM, James Peach <> wrote:
> Hi all,
> I’ve posted a pull request <>
that integrates clang-tidy into the build. The usual way to do this is to use the bear tool
to build a JSON compilation database, however that has a couple of drawbacks. First, dynamic
library preloading is disabled by default on OS X and some Linux configurations. Second, the
database only contains files you actually build (ie. no header files).
> The approach in the PR is to add a ‘tidy’ target to all the makefiles which uses
the locally defined compiler arguments to tidy every source file, including headers. Now,
this goes horribly wrong in some places (eg. iocore) because our headers are not self-contained.
clang-tidy cannot parse the incomplete header file and does not make any of the changes we
want. If we force it to continue despite the errors, it can make incorrect source changes.
> So, should we try to make all our headers self-contained so that clang-tidy can process
them? This probably would involve somewhat extensive header refactoring. I’d appreciate
any feedback (and volunteers!) …

What does this imply? A header file (.h file) can not include another .h file that’s in
the ATS tree?

— leif

View raw message