- Add BlockDecl AST node.
- Modify BlockExpr to reference the BlockDecl.
This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?).
Still some follow-up work to finish this (forthcoming).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index db179fe..b42950f 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -49,6 +49,7 @@
static unsigned nObjCPropertyImplDecl = 0;
static unsigned nLinkageSpecDecl = 0;
static unsigned nFileScopeAsmDecl = 0;
+static unsigned nBlockDecls = 0;
static bool StatSwitch = false;
@@ -77,6 +78,7 @@
case Union: return "Union";
case Class: return "Class";
case Enum: return "Enum";
+ case Block: return "Block";
}
}
@@ -221,6 +223,7 @@
case ObjCPropertyImpl: nObjCPropertyImplDecl++; break;
case LinkageSpec: nLinkageSpecDecl++; break;
case FileScopeAsm: nFileScopeAsmDecl++; break;
+ case Block: nBlockDecls++; break;
case ImplicitParam:
case TranslationUnit: break;