[PATCH] D27852: [modules] Handle modules with nonstandard names in module.private.modulemaps
Bruno Cardoso Lopes via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 20 09:59:23 PST 2016
bruno added a comment.
Hi,
Thanks for working on this.
================
Comment at: include/clang/Basic/DiagnosticLexKinds.td:647
+ "top-level module '%0' in private module map, expected a submodule of '%1'">,
+ InGroup<DiagGroup<"private-module">>;
----------------
It would be nice if we could also emit a FixIt to tell the user how should the modulemap be fixed.
================
Comment at: lib/Lex/HeaderSearch.cpp:208
+ // FooPrivate.framework.
+ if (!Module && SearchName.consume_back("Private")) {
+ Module = lookupModule(ModuleName, SearchName);
----------------
Remove the curly braces here
================
Comment at: lib/Lex/HeaderSearch.cpp:211
+ }
+
+ return Module;
----------------
Remove this newline
================
Comment at: lib/Lex/HeaderSearch.cpp:216
+Module *HeaderSearch::lookupModule(StringRef ModuleName, StringRef SearchName) {
+
+ Module *Module = nullptr;
----------------
Remove this newline
================
Comment at: test/Modules/implicit-private-with-different-name.m:9
+
+// expected-warning at Inputs/implicit-private-with-different-name/A.framework/Modules/module.private.modulemap:1{{expected a submodule}}
+
----------------
Can you check for the entire warning message?
https://reviews.llvm.org/D27852
More information about the cfe-commits
mailing list