[cfe-commits] r59853 - /cfe/trunk/lib/Parse/ParseTentative.cpp

Chris Lattner clattner at apple.com
Fri Nov 21 17:20:57 PST 2008


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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blocks-test.patch
Type: application/octet-stream
Size: 418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081121/72e90a93/attachment.obj>
-------------- next part --------------




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
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list