[Patch][ObjC][Proposal] NSValue literals
AlexDenisov
1101.debian at gmail.com
Thu Dec 11 13:12:02 PST 2014
> there is a good chance we won’t be adding boxing of pointers.
Do you mean pointers to void (valueWithPointer) or all the pointers, like NSObject * (valueWithNonretainedObject)?
Anyway, should I get rid of that functionality before submitting updated patch or keep it and, probably, drop later?
--
AlexDenisov
Software Engineer, https://github.com/AlexDenisov
On 10 Dec 2014 at 23:00:38, jahanian (fjahanian at apple.com) wrote:
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/20141211/a0b94834/attachment.html>
More information about the cfe-commits
mailing list