On Nov 21, 2008, at 5:15 PM, Chris Lattner wrote:
Author: lattner Date: Fri Nov 21 19:15:33 2008 New Revision: 59853 URL: http://llvm.org/viewvc/llvm-project?rev=59853&view=rev Log: Teach tentative parsing to handle block pointers (rdar://6394309)
Here's a testcase for this change. I can't commit this until blocks are re-enabled in c++ mode though,
blocks-test.patch
Description: Binary data
They are currently blocked (haha) on clang not supporting __null. -Chris
Modified: cfe/trunk/lib/Parse/ParseTentative.cpp Modified: cfe/trunk/lib/Parse/ParseTentative.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseTentative.cpp?rev=59853&r1=59852&r2=59853&view=diff = = = = = = = = ====================================================================== --- cfe/trunk/lib/Parse/ParseTentative.cpp (original) +++ cfe/trunk/lib/Parse/ParseTentative.cpp Fri Nov 21 19:15:33 2008 @@ -399,7 +399,8 @@ // ptr-operator declarator while (1) { - if (Tok.is(tok::star) || Tok.is(tok::amp)) { + if (Tok.is(tok::star) || Tok.is(tok::amp) || + (Tok.is(tok::caret) && getLang().Blocks)) { // ptr-operator ConsumeToken(); while (Tok.is(tok::kw_const) || _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
