<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Richard,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<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?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-John<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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:metafoo@gmail.com]
<br>
<b>Sent:</b> Friday, January 31, 2014 12:56 PM<br>
<b>To:</b> Thompson, John; Zach Davis; Chad Rosier; cfe-dev@cs.uiuc.edu<br>
<b>Subject:</b> Re: [cfe-dev] How to add a -W flag?<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></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?)<o:p></o:p></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">John_Thompson@playstation.sony.com</a>> wrote:<o:p></o:p></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><o:p></o:p></p>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-John</span><o:p></o:p></p>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></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><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p> <o:p></o:p></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<o:p></o:p></p>
</div>
<div>
<p style="margin-bottom:12.0pt"> <o:p></o:p></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:<o:p></o:p></p>
<div>
<div>
<p>I’m adding a warning to the end of the “Modules Issues” category in DiagnosticSemaKinds.td:<o:p></o:p></p>
<p> <o:p></o:p></p>
<p style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;background:white">def warn_need_module_import : Warning<</span><o:p></o:p></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><o:p></o:p></p>
<p> <o:p></o:p></p>
<p>This makes test/Misc/warning-flags.c fail.<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>A comment in that test file says:<o:p></o:p></p>
<p> <o:p></o:p></p>
<p> If you add a new warning without a flag, this test will fail. To fix<o:p></o:p></p>
<p> this test, simply add a warning group to that warning.<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>I don’t know what that means. How do I add a warning group to the warning?<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>Thanks.<o:p></o:p></p>
<p><span style="color:#888888"> </span><o:p></o:p></p>
<p><span style="color:#888888">-John</span><o:p></o:p></p>
<p><span style="color:#888888"> </span><o:p></o:p></p>
<p><span style="color:#888888"> </span><o:p></o:p></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><o:p></o:p></p>
</div>
<p> <o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
</body>
</html>