<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=utf-8">
<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;}
/* 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;}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
.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" style="margin-left:.5in"><span style="font-family:"Arial","sans-serif";color:#222222;background:white">On Thu, Oct 16, 2014 at 12:58 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank"><span style="color:#1155CC">richard@metafoo.co.uk</span></a>> wrote:</span><span style="font-family:"Arial","sans-serif";color:#222222"><br>
<br>
</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in;background:white"><span style="font-family:"Arial","sans-serif";color:#222222">I have an additional suggestion: we treat tests that do not explicitly specify a language standard as testing *all* language modes. By
default, we continue to run them only in the default language mode of the clang driver, but we:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;background:white"><span style="font-family:"Arial","sans-serif";color:#222222"> -- Add a driver and cc1 flag to set a default language mode for each language<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;background:white"><span style="font-family:"Arial","sans-serif";color:#222222"> -- Add a buildbot that runs all tests with the default language mode set to each possible value<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;background:white"><span style="font-family:"Arial","sans-serif";color:#222222"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;background:white"><span style="font-family:"Arial","sans-serif";color:#222222">This will prevent us from losing most of our C99 test coverage when we switch our default (and would also prevent us from losing most
of our C++98 test coverage if/when we switch our default C++ language mode to C++11). The added driver flag might also be useful to people who aren't ready for our new default yet.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;background:white"><span style="font-family:"Arial","sans-serif";color:#222222"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;background:white"><span style="font-family:"Arial","sans-serif";color:#222222">For the new flag, how about -std-default=c99 ?<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Arial","sans-serif";color:#222222"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Arial","sans-serif";color:#222222">Seems like sufficient lit.cfg magic could vary the substitution of the %clang[_cc1] variables to supply -std=whatever. As long as Clang's -std option
parsing takes the last-one-specified without complaint, any test that explicitly specified -std would still obey that option. No clang changes needed. One bot per non-default-dialect would be sufficient.<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Arial","sans-serif";color:#222222"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Arial","sans-serif";color:#222222">There would be some period of pain while smoking out the tests that actually did depend on the older dialect. As a data point, when Sony privately switched
to default to C++11, we added –std to something like 100-150 tests to get them to pass again, but the rest were all fine.<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:"Arial","sans-serif";color:#222222">--paulr<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
</div>
</body>
</html>