[PATCH] pr21217 - -fmodule-map-file should warn on non-existent file

Richard Smith richard at metafoo.co.uk
Thu Nov 20 14:55:20 PST 2014

(Question for Daniel:) Why do we defer loading the explicitly-specified module map files until we perform a lookup? It seems like that will not work for Objective-C, where a module can be imported without ever looking up a file (by using `@import`). As John notes, this also means that there can be corner cases where we don't diagnose a missing module map file that was specified on the command line.

Comment at: include/clang/Basic/DiagnosticLexKinds.td:614-616
@@ -613,2 +613,5 @@
+def warn_module_map_not_found : Warning<
+  "File '%0' specified via -fmodule-map-file not found">,
+  InGroup<ModuleMapMissing>;
I think this should be an error rather than a warning. I don't think there are any other cases where we ignore a missing input file that was specified on the command line. Also, diagnostic messages should start with a lowercase letter.


More information about the cfe-commits mailing list