<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 31, 2014 at 2:05 PM, Thompson, John <span dir="ltr"><<a href="mailto:John_Thompson@playstation.sony.com" target="_blank">John_Thompson@playstation.sony.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Richard,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I’m working on a fixit such that when a type or other symbol can’t be found, it will search all the modules, and if the missing identifier is found, it will
 implicitly import the module, display a fixit warning, and continue.  This is something Doug Gregor suggested to me at the last conference when I asked for ideas of some things I might do to help the modules effort.</span></p>
</div></div></blockquote><div><br></div><div>By "search all the modules" I assume you mean search the global module index? (We already do this in the case where the name is found in a non-visible submodule of a loaded module.)</div>
<div><br></div><div>It seems a bit weird for our diagnostics to depend on what happens to be in the global module index, but I don't have any alternative suggestion.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I’ll post on Phabricator very shortly (hopefully this afternoon) a rough preview patch soon which just handles one case of a missing type, along with some questions,
 as there’s some more work needed that I’m not sure how to do yet, and the process I came up with of getting the global module index to cover all the modules is kind of iffy, so I wanted to have someone with more knowledge of the module system look at it. 
 Can I put you as a reviewer, or can you suggest someone?</span></p></div></div></blockquote><div><br></div><div>I don't think there's anyone better than Doug or myself.</div><div><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"> </span></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-John<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Richard Smith [mailto:<a href="mailto:metafoo@gmail.com" target="_blank">metafoo@gmail.com</a>]
<br>
<b>Sent:</b> Friday, January 31, 2014 12:56 PM<br>
<b>To:</b> Thompson, John; Zach Davis; Chad Rosier; <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a></span></p><div><div class="h5"><br>
<b>Subject:</b> Re: [cfe-dev] How to add a -W flag?<u></u><u></u></div></div><p></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">You should start your diagnostic text with a lowercase letter. I'm also curious what you're diagnosing here! (Missing import of macros, maybe?)<u></u><u></u></p>
<div>
<p class="MsoNormal">On Fri Jan 31 2014 at 12:47:21 PM, Thompson, John <<a href="mailto:John_Thompson@playstation.sony.com" target="_blank">John_Thompson@playstation.sony.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thank you both, Zach and Chad!</span><u></u><u></u></p>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-John</span><u></u><u></u></p>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Zach Davis [mailto:<a href="mailto:zdavkeos@gmail.com" target="_blank">zdavkeos@gmail.com</a>]
<br>
<b>Sent:</b> Friday, January 31, 2014 11:55 AM<br>
<b>To:</b> Thompson, John<br>
<b>Cc:</b> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<b>Subject:</b> Re: [cfe-dev] How to add a -W flag?</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p> <u></u><u></u></p>
<div>
<p style="margin-bottom:12.0pt">I believe you need to add your warning to a group like so:<br>
<br>
  def warn_need_module_import : Warning<<br>
    "Use of identifier '%0' requires import/inclusion of the module '%1'">;<br>
<br>
becomes --><br>
<br>
  def warn_need_module_import : Warning<<br>
    "Use of identifier '%0' requires import/inclusion of the module '%1'">,<br>
    InGroup<SomeGroup>;<br>
<br>
where "SomeGroup" is taken from DiagnosticGroups.td .<br>
<br>
You can add you own group as well, the format is like:<br>
<br>
  def SomeGroup : DiagGroup<"some-group">;<br>
<br>
and then you should be able to use -Wsome-group<u></u><u></u></p>
</div>
<div>
<p style="margin-bottom:12.0pt"> <u></u><u></u></p>
<div>
<p>On Fri, Jan 31, 2014 at 1:29 PM, Thompson, John <<a href="mailto:John_Thompson@playstation.sony.com" target="_blank">John_Thompson@playstation.sony.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p>I’m adding a warning to the end of the “Modules Issues” category in DiagnosticSemaKinds.td:<u></u><u></u></p>
<p> <u></u><u></u></p>
<p style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;background:white">def warn_need_module_import : Warning<</span><u></u><u></u></p>
<p style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;background:white">  "Use of identifier '%0' requires import/inclusion of the module '%1'">;</span><u></u><u></u></p>

<p> <u></u><u></u></p>
<p>This makes test/Misc/warning-flags.c fail.<u></u><u></u></p>
<p> <u></u><u></u></p>
<p>A comment in that test file says:<u></u><u></u></p>
<p> <u></u><u></u></p>
<p>    If you add a new warning without a flag, this test will fail.  To fix<u></u><u></u></p>
<p>    this test, simply add a warning group to that warning.<u></u><u></u></p>
<p> <u></u><u></u></p>
<p>I don’t know what that means.  How do I add a warning group to the warning?<u></u><u></u></p>
<p> <u></u><u></u></p>
<p>Thanks.<u></u><u></u></p>
<p><span style="color:#888888"> </span><u></u><u></u></p>
<p><span style="color:#888888">-John</span><u></u><u></u></p>
<p><span style="color:#888888"> </span><u></u><u></u></p>
<p><span style="color:#888888"> </span><u></u><u></u></p>
</div>
</div>
<p style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><u></u><u></u></p>
</div>
<p> <u></u><u></u></p>
</div>
</div>
</div>
</blockquote>
</div></div></div>
</div>

</blockquote></div><br></div></div>