On Thu, Mar 14, 2013 at 10:16 AM, Michael Han <span dir="ltr"><<a href="mailto:fragmentshaders@gmail.com" target="_blank">fragmentshaders@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
  Thanks, this sounds good.<br>
<br>
  Rather than passing an enum value to 'printPretty' that indicates where the attributes are, how about passing an enum value to it that indicates the syntax of the attribute so when we ask all attributes to print themselves, only the specified syntax(es) will be printed out?<br>
</blockquote><div><br></div><div>I don't think that will work out so well -- it'd require the declaration printer etc. to know about all forms of attribute, and in general the attribute syntax isn't sufficient to know where the attribute should go (for instance, the 'final' keyword attribute goes at the end of the declaration, but the '_Noreturn' keyword attribute goes at the start, and the 'alignas' keyword attribute goes after the identifier).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://llvm-reviews.chandlerc.com/D395" target="_blank">http://llvm-reviews.chandlerc.com/D395</a><br>
</blockquote></div><br>