[cfe-commits] r96357 - /cfe/trunk/test/Analysis/blocks.m
Ted Kremenek
kremenek at apple.com
Tue Feb 16 08:55:11 PST 2010
Author: kremenek
Date: Tue Feb 16 10:55:10 2010
New Revision: 96357
URL: http://llvm.org/viewvc/llvm-project?rev=96357&view=rev
Log:
Add test case showing that a recursive block that captures a block pointer that
isn't marked '__block' is bad.
Modified:
cfe/trunk/test/Analysis/blocks.m
Modified: cfe/trunk/test/Analysis/blocks.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/blocks.m?rev=96357&r1=96356&r2=96357&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/blocks.m (original)
+++ cfe/trunk/test/Analysis/blocks.m Tue Feb 16 10:55:10 2010
@@ -83,3 +83,8 @@
// 'x' is bound at block creation.
^{ y = x + 1; }(); // no-warning
}
+
+void test2_c() {
+ typedef void (^myblock)(void);
+ myblock f = ^() { f(); }; // expected-warning{{Variable 'f' is captured by block with a garbage value}}
+}
\ No newline at end of file
More information about the cfe-commits
mailing list