if they have the same alignment and one was 'this'.
Fixes PR24780.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247482
91177308-0d34-0410-b5e6-
96231b3b80d8
return left.Alignment > right.Alignment;
auto getPrefOrder = [](const BlockLayoutChunk &chunk) {
- if (chunk.Capture->isByRef())
+ if (chunk.Capture && chunk.Capture->isByRef())
return 1;
if (chunk.Lifetime == Qualifiers::OCL_Strong)
return 0;
@end
void f(int (^bl)(B* b));
+void takeBlock(void (^block)());
+void useValues(...);
// Test1
void g() {
return foovar;
};
}
+
+// PR24780
+class CaptureThisAndAnotherPointer {
+ void test(void *ptr) {
+ takeBlock(^{ useValues(ptr, this); });
+ }
+};