[cfe-dev] diagnostics database for multi-file build?

David Chisnall David.Chisnall at cl.cam.ac.uk
Wed Feb 25 00:48:47 PST 2015


On 24 Feb 2015, at 13:21, Samuel Williams <space.ship.traveller at gmail.com> wrote:
> 
> I'm interested in a way to collect unique errors/diagnostics over multiple files in a single build. Does such a thing exist? e.g. some kind of database that could be shared between multiple concurrent instances of clang which would allow me to review all unique errors across an entire code base, ideally in real time but perhaps once the build completes would be okay to start with too. Thanks.

How are you invoking clang?  Ninja solves this by redirecting standard output error for each tool invocation to a pipe that it can then collect, which allows it to present them separately.  If you want to extract unique errors, then simply filtering the result on the file and line number would probably be enough (though, in general, it's a bad idea because you can have different bugs in the same line of code depending on prior inclusions).

David



More information about the cfe-dev mailing list