diff options
| author | John McCall <rjmccall@apple.com> | 2010-06-04 19:02:56 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-06-04 19:02:56 +0000 |
| commit | 8e346702b6f7d628ad1bf5fc3e8cdc697b08a9b7 (patch) | |
| tree | 1ccc3b8eecb54ecb9db1daf2f2f6c544d618e8a0 /clang/lib/Sema/Sema.h | |
| parent | 7f3d95054b492fbf6ebc22f7db32fb1574f25e6c (diff) | |
| download | bcm5719-llvm-8e346702b6f7d628ad1bf5fc3e8cdc697b08a9b7.tar.gz bcm5719-llvm-8e346702b6f7d628ad1bf5fc3e8cdc697b08a9b7.zip | |
Preserve more information from a block's original function declarator, if one
was given. Remove some unnecessary accounting from BlockScopeInfo. Handle
typedef'ed function types until such time as we decide not.
llvm-svn: 105478
Diffstat (limited to 'clang/lib/Sema/Sema.h')
| -rw-r--r-- | clang/lib/Sema/Sema.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 32cd6dcc5cb..09d813c7dbe 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -155,9 +155,6 @@ struct FunctionScopeInfo { /// \brief Retains information about a block that is currently being parsed. struct BlockScopeInfo : FunctionScopeInfo { - llvm::SmallVector<ParmVarDecl*, 8> Params; - bool hasPrototype; - bool isVariadic; bool hasBlockDeclRefExprs; BlockDecl *TheDecl; @@ -166,13 +163,17 @@ struct BlockScopeInfo : FunctionScopeInfo { /// arguments etc. Scope *TheScope; - /// ReturnType - This will get set to block result type, by looking at - /// return types, if any, in the block body. + /// ReturnType - The return type of the block, or null if the block + /// signature didn't provide an explicit return type. QualType ReturnType; + /// BlockType - The function type of the block, if one was given. + /// Its return type may be BuiltinType::Dependent. + QualType FunctionType; + BlockScopeInfo(unsigned NumErrors, Scope *BlockScope, BlockDecl *Block) - : FunctionScopeInfo(NumErrors), hasPrototype(false), isVariadic(false), - hasBlockDeclRefExprs(false), TheDecl(Block), TheScope(BlockScope) + : FunctionScopeInfo(NumErrors), hasBlockDeclRefExprs(false), + TheDecl(Block), TheScope(BlockScope) { IsBlockInfo = true; } |

