[analyzer] Malloc: drop symbols captured by blocks.

llvm-svn: 153232
diff --git a/clang/test/Analysis/malloc.mm b/clang/test/Analysis/malloc.mm
index 31db5ce..4cb2cfa 100644
--- a/clang/test/Analysis/malloc.mm
+++ b/clang/test/Analysis/malloc.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify -fblocks %s
 #include "system-header-simulator-objc.h"
 
 typedef __typeof(sizeof(int)) size_t;
@@ -97,3 +97,12 @@
   return [NSData dataWithBytesNoCopy:bytes length:10]; // no-warning
 }
 
+void testBlocks() {
+  int *x= (int*)malloc(sizeof(int));
+  int (^myBlock)(int) = ^(int num) {
+    free(x);
+    return num;
+  };
+  myBlock(3);
+}
+