<div dir="ltr">SemaDeclAttr:2450 is underindented<br><div class="gmail_quote"><div dir="ltr"><div>ClangAttrEmitter:988 is underindented</div><div><br></div><div>The writeConversion function you generate has undefined behavior if the string is not a member of the enumeration (because -1 is not a representable value in the enumeration type). How about using a StringSwitch<Optional<EnumType> > ? (You could even return Optional<EnumType> directly from ConvertStrToEnumType.)</div>

</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 10, 2013 at 7:44 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">Ping<br>
<div><div><br>
On Fri, Sep 6, 2013 at 2:31 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>> wrote:<br>
> This patch causes tablegen to generate a StringSwitch for attributes<br>
> that contain enum args, mapping from the enumerant string to the<br>
> proper enumeration value.  It resolves inconsistencies between<br>
> diagnostics, and brings us one step closer to more generalized error<br>
> reporting for attributes.<br>
><br>
> ~Aaron<br>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>