This is an archive of the discontinued LLVM Phabricator instance.

[clang-tools-extra] module-map-checker - new tool for checking module.map coverage
ClosedPublic

Authored by jtsoftware on Dec 19 2013, 8:09 AM.

Details

Summary

This new tool uses clang libraries to load a module map and then collects all the header files in the module map directory and below (or optionally the set of include directories specified) and checks to see if the module map references all the files in its directory tree, whether explicilty referenced in the module map file, or implicitly covered by an umbrella directory or header. For umbrella headers, it will preprocess the file, using a PPCallbacks derivation to collect any headers included by the umbrella header. If any files are found which are not covered by the module map, the tool displays warning messages.

I would appreciate the usual review feedback regarding the tool doing what it should be doing functionally and the coding.

(Note that I'll be away from Dec 21 - Jan 5 for the holidays, so I won't be able to respond until after I return.)

Thanks, and Merry Christmas!

-John

Diff Detail

Event Timeline

doug.gregor accepted this revision.Dec 19 2013, 8:40 PM

This is extremely useful functionality for anyone updating or maintaining a module map for a system. Thanks for working on this!

jtsoftware closed this revision.May 5 2014, 6:00 PM

Committed in r198693.