[cfe-commits] r55495 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def include/clang/Parse/Action.h include/clang/Parse/DeclSpec.h include/clang/Parse/Parser.h include/clang/Parse/Scope.h lib/AST/ASTContext.cpp lib/Parse/ParseExpr.cpp test/Parser/block-pointer-decl.c
Chris Lattner
clattner at apple.com
Thu Aug 28 16:07:31 PDT 2008
On Aug 28, 2008, at 12:20 PM, Steve Naroff wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=55495&view=rev
> Log:
> Add parser/action support for block literal expressions.
> Parser support for blocks is almost complete...just need to add
> support for the __block() storage class qualifier.
Great!
> + /// ActOnBlockExprExpr - This is called when the body of a block
> + /// expression literal was successfully completed. ^(int x)[foo
> bar: x]
> + virtual ExprResult ActOnBlockExprExpr(SourceLocation CaretLoc,
> ExprTy *Body,
> + Scope *CurScope) { return
> 0; }
Block expressions got removed from the language, they require {}'s now.
> +/// ParseBlockLiteralExpression - Parse a block literal, which
> roughly looks
> +/// like ^(int x){ return x+1; } or ^(int y)foo(4, y, z)
Likewise, this method can be simplified for the same reason.
Thanks Steve,
-Chris
More information about the cfe-commits
mailing list