Use the BlockDecl captures list to infer the direct captures for a BlockDataRegion.  Fixes <rdar://problem/12415065>.

We still need to do a recursive walk to determine all static/global variables
referenced by a block, which is needed for region invalidation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169481 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed