Fix regression in LiveVariables when reasoning about variables captured by blocks.

llvm-svn: 147116
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp
index ff6607d..89cf9f8 100644
--- a/clang/lib/Analysis/LiveVariables.cpp
+++ b/clang/lib/Analysis/LiveVariables.cpp
@@ -354,11 +354,10 @@
 }
 
 void TransferFunctions::VisitBlockExpr(BlockExpr *BE) {
-  AnalysisDeclContext::referenced_decls_iterator I, E;
-  llvm::tie(I, E) =
-    LV.analysisContext.getReferencedBlockVars(BE->getBlockDecl());
-  for ( ; I != E ; ++I) {
-    const VarDecl *VD = *I;
+  const BlockDecl *BD = BE->getBlockDecl();
+  for (BlockDecl::capture_const_iterator it = BD->capture_begin(),
+       ei = BD->capture_end(); it != ei; ++it) {
+    const VarDecl *VD = it->getVariable();
     if (isAlwaysAlive(VD))
       continue;
     val.liveDecls = LV.DSetFact.add(val.liveDecls, VD);