majnemer added a subscriber: majnemer.
majnemer added a comment.

I believe this change is correct but I believe we can handle this a little more 
efficiently.

I wonder if it would be better if we instead inserted a special EOF token at 
the end of `Toks`.  If any errors occur, consume tokens until we hit our 
special EOF token. `ParseLexedAttribute` and `ParseLexedMethodDeclaration` 
follow this pattern.  To make it a little more obvious that the lifetime of 
`Toks` is somehow tied to `EnterTokenStream` and the parsing code that follows, 
it might make sense to factor the code after `EnterTokenStream` into another 
function.


http://reviews.llvm.org/D16572



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to