<div dir="ltr">On 18 October 2013 10:50, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can this be done as part of the attribute spelling instead of a<br>
separate bit?  Eg) introduce GCC as a spelling that implies GNU?<br></blockquote><div><br></div><div>You can add a GCC spelling but you can't make a single spelling imply both GNU and CXX11<"gnu",...>. I tried this first -- having one GCC entry in the Spellings list imply two spellings under the hood, but it was really, nasty. Do not suggest that I do this unless you try it.</div>


<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>  def Const : InheritableAttr {<br>
> -  let Spellings = [GNU<"const">, GNU<"__const">, CXX11<"gnu", "const">];<br>
> +  let Spellings = [GNU<"const">, GNU<"__const">, CXX11<"gnu", "const">,<br>
> +           CXX11<"gnu", "__const">];<br>
> +  let GCC = 1;<br>
>  }<br>
<br>
This should be a separate patch with a test case for the additional spelling.<br></blockquote><div><br></div><div>So indeed it can. I'll land that.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


>  def NoSanitizeAddress : InheritableAttr {<br>
>    let Spellings = [GNU<"no_address_safety_analysis">,<br>
> -                   GNU<"no_sanitize_address">];<br>
> +                   GNU<"no_sanitize_address">,<br>
> +                   CXX11<"gnu", "no_address_safety_analysis">,<br>
> +                   CXX11<"gnu", "no_sanitize_address">];<br>
> +  let GCC = 1;<br>
>  }<br>
<br>
As should this.<br></blockquote><div><br></div><div>And I'll land this.</div><div><br></div><div>Nick</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Otherwise, patch LTGTM!<br>
<span><font color="#888888"><br>
~Aaron<br>
</font></span><div><div><br>
On Fri, Oct 18, 2013 at 1:45 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:<br>
> Can you arrange to only emit the generated function once? Otherwise, lgtm.<br>
><br>
> On 18 Oct 2013 01:15, "Nick Lewycky" <<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>> wrote:<br>
>><br>
>> The attached patch refactors a string switch table about attributes into<br>
>> the Attrs.td file. Any behaviour change is incidental (ie., the table was<br>
>> out of sync before this change), this is a refactoring.<br>
>><br>
>> Please review!<br>
>><br>
>> Nick<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> cfe-commits mailing list<br>
>> <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
>><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
</div></div></blockquote></div><br></div></div>