[PATCH] D32576: [Modules] Improve diagnostics for incomplete umbrella

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 26 19:26:44 PDT 2017


dexonsmith accepted this revision.
dexonsmith added a comment.
This revision is now accepted and ready to land.

LGTM after a couple of changes inline.



================
Comment at: lib/Lex/PPLexerChange.cpp:290-292
+static void
+collectAllSubModulesWithUmbrellaHeader(Module *Mod,
+                                       SmallVectorImpl<Module *> &SubMods) {
----------------
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.


================
Comment at: lib/Lex/PPLexerChange.cpp:299
+
+void Preprocessor::diagnoseMissingHeaderInUmbrellaDir(Module *Mod) {
+  assert(Mod->getUmbrellaHeader() && "Module must use umbrella header");
----------------
Seems better to take `Mod` by reference here.  Also, `const` if possible.


https://reviews.llvm.org/D32576





More information about the cfe-commits mailing list