<div dir="ltr">LGTM</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 12:20 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch cleans up the __has_attribute implementation, but does not<br>
modify its behavior. This is a partial application of the patch<br>
discussed in <a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-March/036130.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-March/036130.html</a><br>
<br>
This patch replaces the tablegen-driven AttrSpellings.inc, which lived<br>
in the lexing layer with AttrHasAttributeImpl.inc, which lives in the<br>
basic layer. It then updates the preprocessor to call through to this<br>
new functionality which can take additional information into account<br>
(such as scopes and syntaxes). It exposes the ability for parts of the<br>
compiler to ask whether an attribute is supported for a given spelling<br>
(including scope), syntax, triple and language options.<br>
<br>
To be clear: this patch is not intended to change the behavior of<br>
__has_attribute. Passing AttrSyntax::Generic ensures that the current<br>
behavior matches the previous implementation in that it *only*<br>
considers the attribute's name and triple, not the scope or language<br>
options. This is why there are no additional test cases supplied with<br>
the patch.<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span></blockquote></div><br></div>