This is an archive of the discontinued LLVM Phabricator instance.

[Modules] Improve diagnostics for incomplete umbrella
ClosedPublic

Authored by bruno on Apr 26 2017, 6:54 PM.

Details

Summary

One of the -Wincomplete-umbrella warnings diagnoses when a header is present in the directory but it's not present in the umbrella header. Currently, this warning only happens on top level modules; any submodule using an umbrella header does not get this warning. Fix that by also considering the submodules.

Diff Detail

Repository
rL LLVM

Event Timeline

bruno created this revision.Apr 26 2017, 6:54 PM
dexonsmith accepted this revision.Apr 26 2017, 7:26 PM
dexonsmith added a subscriber: dexonsmith.

LGTM after a couple of changes inline.

lib/Lex/PPLexerChange.cpp
290–292 ↗(On Diff #96857)

I think you can take Mod by reference.

Also: I'm not sure if it can be const, but please check (also, SmallVectorImpl<const Module*>) and use const if possible.

299 ↗(On Diff #96857)

Seems better to take Mod by reference here. Also, const if possible.

This revision is now accepted and ready to land.Apr 26 2017, 7:26 PM

Oh, and it would be nice to split out Preprocessor::diagnoseMissingHeaderInUmbrellaDir in a separate NFC commit ahead of time.

This revision was automatically updated to reflect the committed changes.