[cfe-commits] r55710 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/AST/StmtNodes.def include/clang/Basic/DiagnosticKinds.def lib/AST/Expr.cpp lib/AST/StmtPrinter.cpp lib/AST/StmtSerialization.cpp lib/Sema/Sema.cpp lib/Sema/Sema.h lib/Se
Daniel Dunbar
daniel at zuster.org
Tue Jul 28 18:53:41 PDT 2009
Hi Steve,
Super old review comment! :)
On Wed, Sep 3, 2008 at 11:15 AM, Steve Naroff<snaroff at apple.com> wrote:
> +/// BlockSemaInfo - When a block is being parsed, this contains information
> +/// about the block. It is pointed to from Sema::CurBlock.
> +struct BlockSemaInfo {
> ...
>
Can this class just have a constructor that does the right
initialization, instead of...
> +/// ActOnBlockStart - This callback is invoked when a block literal is started.
> +void Sema::ActOnBlockStart(SourceLocation CaretLoc, Scope *BlockScope,
> + Declarator &ParamInfo) {
> + // Analyze block parameters.
> + BlockSemaInfo *BSI = new BlockSemaInfo();
> +
> + // Add BSI to CurBlock.
> + BSI->PrevBlockInfo = CurBlock;
> + CurBlock = BSI;
> +
> + BSI->ReturnType = 0;
> + BSI->TheScope = BlockScope;
... doing it here? Also, I think this class can be local to this file.
- Daniel
More information about the cfe-commits
mailing list