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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105478 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 32cd6dc..09d813c 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -155,9 +155,6 @@
 
 /// \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 @@
   /// 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;
   }