diff options
Diffstat (limited to 'test/CodeGenCXX/blocks.cpp')
-rw-r--r-- | test/CodeGenCXX/blocks.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGenCXX/blocks.cpp b/test/CodeGenCXX/blocks.cpp index d66debea2b..a4d5b86565 100644 --- a/test/CodeGenCXX/blocks.cpp +++ b/test/CodeGenCXX/blocks.cpp @@ -87,3 +87,20 @@ namespace test2 { // CHECK: define internal void @__Block_byref_object_dispose // CHECK: call void @_ZN5test21BD1Ev( } + +// rdar://problem/9334739 +// Make sure we mark destructors for parameters captured in blocks. +namespace test3 { + struct A { + A(const A&); + ~A(); + }; + + struct B : A { + }; + + void test(B b) { + extern void consume(void(^)()); + consume(^{ (void) b; }); + } +} |