nlewycky added a comment.

In https://reviews.llvm.org/D31839#722763, @ahatanak wrote:

> Is it possible to fix ObjCMessageExpr too while you are in here?


I looked into this, but it turns out to be different enough to belong in a 
separate patch. An ObjCMessageExpr has void type which means that we bail very 
early in the expression evaluator since void isn't a literal type. I think the 
original design of the code was to turn an Expr* into an APValue, and as we 
push it past that original purpose we're going to need to restructure it a bit.

> I think clang should issue a warning when compiling the following code:
> 
>   @protocol NSObject
>   @end
>   
>   @interface NSObject<NSObject>
>   @end
>   
>   @interface C1 : NSObject
>   - (void)foo:(int)i;
>   @end
>   @implementation C1
>   - (void)foo:(int)i {
>   }
>   @end
>   
>   void test1(C1 *c) {
>     [c foo:(4068 * 1024 * 1024)];
>   }




https://reviews.llvm.org/D31839



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

Reply via email to