ahatanak added a comment.

This patch fixes the crash and that is fine, but the users might find the last 
error ("expected '}'" at the end of the file) confusing. This seems to happen 
because Parser::ParseLexedObjCMethodDefs consumes all tokens in the file until 
it sees the EOF after consuming all the cached tokens of LexedMethod.

I wonder whether we can insert a fake EOF token to prevent 
ParseLexedObjCMethodDefs from going all the way to the end, just like 
ParseCXXNonStaticMemberInitialize does. Do you think that would work or would 
it be too hackish?


Repository:
  rL LLVM

https://reviews.llvm.org/D34185



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

Reply via email to