MadCoder added a comment.

In D71091#1775722 <https://reviews.llvm.org/D71091#1775722>, @liuliu wrote:

> We don't use PCH :) I arc patched the latest diff, still have that crash. 
> More strangely, I tried this latest diff on previously simplistic test case 
> and it crashes now:
>
>   #import <Foundation/Foundation.h>
>  
>   @interface SCTestMainEntity : NSObject
>  
>   @property (nonatomic, readonly, direct) int date;
>  
>   - (instancetype)initWithDate:(int)date;
>  
>   @end
>  
>   int main(void)
>   {
>       SCTestMainEntity *entity = [[SCTestMainEntity alloc] initWithDate:10];
>       printf("%d\n", entity.date);
>       return 0;
>   }
>


Ugh, you're right, and that's because my test is missing one case. doh.

you can work-around by re-redefining `-(int)date __attribute__((objc_direct));` 
next to the property. it works in the test beacuse the call site picks up the 
implementation to form the call. sigh.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71091/new/

https://reviews.llvm.org/D71091



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to