<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 19, 2015 at 4:18 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">================<br>
Comment at: include/clang/Basic/DiagnosticLexKinds.td:626<br>
@@ -625,1 +625,3 @@<br>
+def note_implicit_top_level_module_import_here : Note<<br>
+  "submodule of top-level module '%0' implicitly imported here">;<br>
 def warn_uncovered_module_header : Warning<<br>
----------------<br>
</span><span class="">benlangmuir wrote:<br>
> I'd just drop "submodule of top-level ".<br>
</span>I think it's an important qualification because the module that was in fact imported is not %0. %0 is the top-level module containing it, and the error is because some submodule of %0 (perhaps the one being imported, perhaps not) has the missing file.<br>
<br>
>From a user's perspective: "The header I included didn't ask for %0 to be imported. It asked for this submodule of it". Ideally we would be able to somehow communicate the "unity build" aspect of top-level modules for this to make sense, but I couldn't find a way to fit all that in a diagnostic.<br>
<br>
Does that make sense?</blockquote><div><br></div><div>We use this kind of introductory text for a diagnostic produced within a module:</div><div><pre style="color:rgb(0,0,0)">In module '<top-level module>' imported from <use of submodule>:</pre></div><div>... and a similar note for a diagnostic that occurs while implicitly building a module, so removing the "submodule of top-level" from your diagnostic would be consistent with that. In fact, I'm not sure your note is necessary; don't we already produce a "While building <top-level module> imported from <somewhere>" message prior to emitting the error message?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10423&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=HH6GMuuctoXVsv8ZwJAvffTj1wVh-hYgUBqZAju5dRM&s=-Wy25uCacB5oUVKKCQaB36I2Bxf0JD6oVp0rIX8OV6E&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10423</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=HH6GMuuctoXVsv8ZwJAvffTj1wVh-hYgUBqZAju5dRM&s=mQ7ASglSlStgvR1lrvVnKoqgPopI9NCurVkJ5IshI4g&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>