Thanks for all the reviews! Committed as r168626 with recommended fixes. Cheers Michael
On Mon, Nov 26, 2012 at 10:43 AM, Richard Smith <rich...@metafoo.co.uk>wrote: > Just some tiny things, then: > > + // Skip C++11 attribute specifiers. > + do { > + if (Tok.is(tok::l_square) && NextToken().is(tok::l_square)) { > + ConsumeBracket(); > + ConsumeBracket(); > + if (!SkipUntil(tok::r_square, false)) > + break; > > This inner ConsumeBracket() / SkipUntil(...) pair is redundant. The > following SkipUntil call will do that for you. > > + if (!SkipUntil(tok::r_square, false)) > > You don't need the ', false' here. If we see a semicolon before the > expected ']', we should bail out. > > + break; > + } else if ((Tok.is(tok::kw_alignas) || Tok.is(tok::kw__Alignas)) && > + NextToken().is(tok::l_paren)) { > + ConsumeToken(); > + ConsumeParen(); > + if (!SkipUntil(tok::r_paren)) > + break; > + } else { > + break; > + } > + } while (true); > > do { ... } while (true); is a bit of a funny way of writing this; > 'while (true) { ... }' is more common in Clang sources. > > @@ -1275,6 +1324,12 @@ > } else > TUK = Sema::TUK_Reference; > > + // Forbid misplaced attributes. In cases of the reference, we pass > attributes > + // to caller to handle. > > *"In the case of a reference, [...]" > >
_______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits