[Patch][ObjC][Proposal] NSValue literals

jahanian fjahanian at apple.com
Wed Dec 10 14:00:37 PST 2014


> On Dec 9, 2014, at 12:21 AM, AlexDenisov <1101.debian at gmail.com> wrote:
> 
> 
> >> Also, why can’t place this under the umbrella objc_boxed_expressions?
> 
> Version 3.5, for example, supports objc_boxed_expression but not NSValue+boxed_expressions, 
> which might cause weird compilation fails. Or did I get it wrong?
No wrong :).

> 
> +        // Otherwise, require a declaration of NSValue.
> +        S.Diag(Loc, diag::err_undeclared_nsvalue);
> +        return nullptr;
> +      }
> +    } else if (!S.NSValueDecl->hasDefinition()) {
> +      S.Diag(Loc, diag::err_undeclared_nsvalue);
> 
> >> Maybe we should have a clearer diagnostic here.
> 
> Makes sense, I used NSNumber' implementation here. I'd appreciate any suggestions or advice on 
> how to improve diagnostic here (and, probably, for NSNumber)

Probably should allude to NSValue (or NSNumber) having no definition (only forward declared).  
But, it is not something I strongly argue for.

P.S. there is a good chance we won’t be adding boxing of pointers. 

Thanks, Fairborz



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141210/91e7bfe6/attachment.html>


More information about the cfe-commits mailing list