Thanks for all the reviews! Committed as r168626 with recommended fixes.<br>
<br>Cheers<br>Michael<br><br><div class="gmail_quote">On Mon, Nov 26, 2012 at 10:43 AM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Just some tiny things, then:<br>
<div><br>
+ // Skip C++11 attribute specifiers.<br>
+ do {<br>
</div>+ if (Tok.is(tok::l_square) && NextToken().is(tok::l_square)) {<br>
+ ConsumeBracket();<br>
+ ConsumeBracket();<br>
+ if (!SkipUntil(tok::r_square, false))<br>
+ break;<br>
<br>
This inner ConsumeBracket() / SkipUntil(...) pair is redundant. The<br>
following SkipUntil call will do that for you.<br>
<br>
+ if (!SkipUntil(tok::r_square, false))<br>
<br>
You don't need the ', false' here. If we see a semicolon before the<br>
expected ']', we should bail out.<br>
<br>
+ break;<br>
+ } else if ((Tok.is(tok::kw_alignas) || Tok.is(tok::kw__Alignas)) &&<br>
+ NextToken().is(tok::l_paren)) {<br>
+ ConsumeToken();<br>
+ ConsumeParen();<br>
+ if (!SkipUntil(tok::r_paren))<br>
+ break;<br>
+ } else {<br>
+ break;<br>
+ }<br>
+ } while (true);<br>
<br>
do { ... } while (true); is a bit of a funny way of writing this;<br>
'while (true) { ... }' is more common in Clang sources.<br>
<br>
@@ -1275,6 +1324,12 @@<br>
} else<br>
TUK = Sema::TUK_Reference;<br>
<br>
+ // Forbid misplaced attributes. In cases of the reference, we pass attributes<br>
+ // to caller to handle.<br>
<br>
*"In the case of a reference, [...]"<br>
<div><div><br></div></div></blockquote></div>