summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2015-09-11 22:00:51 +0000
committerJohn McCall <rjmccall@apple.com>2015-09-11 22:00:51 +0000
commit9c52b28003cd77b09939319374b7515760ca5956 (patch)
tree542612a8b123525d5a8c85023c3e47301dc231e5 /clang/test
parent1d12ab3db192bf28e5fe2df01919fdba2a09826b (diff)
downloadbcm5719-llvm-9c52b28003cd77b09939319374b7515760ca5956.tar.gz
bcm5719-llvm-9c52b28003cd77b09939319374b7515760ca5956.zip
When comparing two block captures for layout, don't crash
if they have the same alignment and one was 'this'. Fixes PR24780. llvm-svn: 247482
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenObjCXX/blocks.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjCXX/blocks.mm b/clang/test/CodeGenObjCXX/blocks.mm
index 62ae428e5ec..fd93437ff65 100644
--- a/clang/test/CodeGenObjCXX/blocks.mm
+++ b/clang/test/CodeGenObjCXX/blocks.mm
@@ -8,6 +8,8 @@
@end
void f(int (^bl)(B* b));
+void takeBlock(void (^block)());
+void useValues(...);
// Test1
void g() {
@@ -59,3 +61,10 @@ void gun() {
return foovar;
};
}
+
+// PR24780
+class CaptureThisAndAnotherPointer {
+ void test(void *ptr) {
+ takeBlock(^{ useValues(ptr, this); });
+ }
+};
OpenPOWER on IntegriCloud