[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: Re: r243048 - Add documentation for the objc_boxable attribute
From: Richard Smith <richard () metafoo ! co ! uk>
Date: 2015-07-24 6:07:51
Message-ID: CAOfiQqkNpfbFO8phgN6OsxZgRck0u_t5DWMvr9PK5tpgSdsujg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Fine by me too :)
On Jul 23, 2015 10:58 PM, "John McCall" <rjmccall@apple.com> wrote:
> > On Jul 23, 2015, at 10:01 PM, AlexDenisov <1101.debian@gmail.com> wrote:
> > Added a bit more documentation for objc_boxable.
> > Could you, please, check it in the release_37?
>
> This is fine by me, but I think technically you might need Richard's
> approval.
>
> John.
>
> >
> >> On 23 Jul 2015, at 23:53, Alex Denisov <1101.debian@gmail.com> wrote:
> >>
> >> Author: alexdenisov
> >> Date: Thu Jul 23 16:53:13 2015
> >> New Revision: 243048
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=243048&view=rev
> >> Log:
> >> Add documentation for the objc_boxable attribute
> >>
> >> Modified:
> >> cfe/trunk/include/clang/Basic/Attr.td
> >> cfe/trunk/include/clang/Basic/AttrDocs.td
> >>
> >> Modified: cfe/trunk/include/clang/Basic/Attr.td
> >> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=243048&r1=243047&r2=243048&view=diff
> >>
> ==============================================================================
> >> --- cfe/trunk/include/clang/Basic/Attr.td (original)
> >> +++ cfe/trunk/include/clang/Basic/Attr.td Thu Jul 23 16:53:13 2015
> >> @@ -1143,7 +1143,7 @@ def ObjCRuntimeName : Attr {
> >> def ObjCBoxable : Attr {
> >> let Spellings = [GNU<"objc_boxable">];
> >> let Subjects = SubjectList<[Record], ErrorDiag,
> "ExpectedStructOrUnion">;
> >> - let Documentation = [Undocumented];
> >> + let Documentation = [ObjCBoxableDocs];
> >> }
> >>
> >> def OptimizeNone : InheritableAttr {
> >>
> >> Modified: cfe/trunk/include/clang/Basic/AttrDocs.td
> >> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttrDocs.td?rev=243048&r1=243047&r2=243048&view=diff
> >>
> ==============================================================================
> >> --- cfe/trunk/include/clang/Basic/AttrDocs.td (original)
> >> +++ cfe/trunk/include/clang/Basic/AttrDocs.td Thu Jul 23 16:53:13 2015
> >> @@ -492,6 +492,34 @@ can only be placed before an @protocol o
> >> }];
> >> }
> >>
> >> +def ObjCBoxableDocs : Documentation {
> >> + let Category = DocCatFunction;
> >> + let Content = [{
> >> +Structs and unions marked with the ``objc_boxable`` attribute can be
> used
> >> +with the Objective-C boxed expression syntax, ``@(...)``.
> >> +
> >> +**Usage**: ``__attribute__((objc_boxable))``. This attribute
> >> +can only be placed on a declaration of a trivially-copyable struct or
> union:
> >> +
> >> +.. code-block:: objc
> >> +
> >> + struct __attribute__((objc_boxable)) some_struct {
> >> + int i;
> >> + };
> >> + union __attribute__((objc_boxable)) some_union {
> >> + int i;
> >> + float f;
> >> + };
> >> + typedef struct __attribute__((objc_boxable)) _some_struct
> some_struct;
> >> +
> >> + // ...
> >> +
> >> + some_struct ss;
> >> + NSValue *boxed = @(ss);
> >> +
> >> + }];
> >> +}
> >> +
> >> def AvailabilityDocs : Documentation {
> >> let Category = DocCatFunction;
> >> let Content = [{
> >>
> >>
> >> _______________________________________________
> >> cfe-commits mailing list
> >> cfe-commits@cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>
>
[Attachment #5 (text/html)]
<p dir="ltr">Fine by me too :)</p>
<div class="gmail_quote">On Jul 23, 2015 10:58 PM, "John McCall" <<a \
href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>> wrote:<br type="attribution"><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> On Jul 23, \
2015, at 10:01 PM, AlexDenisov <<a href="mailto:1101.debian@gmail.com">1101.debian@gmail.com</a>> \
wrote:<br> > Added a bit more documentation for objc_boxable.<br>
> Could you, please, check it in the release_37?<br>
<br>
This is fine by me, but I think technically you might need Richard's approval.<br>
<br>
John.<br>
<br>
><br>
>> On 23 Jul 2015, at 23:53, Alex Denisov <<a \
href="mailto:1101.debian@gmail.com">1101.debian@gmail.com</a>> wrote:<br> >><br>
>> Author: alexdenisov<br>
>> Date: Thu Jul 23 16:53:13 2015<br>
>> New Revision: 243048<br>
>><br>
>> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject- \
3Frev-3D243048-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCx \
k&m=7nuoH3zAY_N4GC40lxhuGOZbQOnYPqYv2fs8-JV0xEw&s=ckCyTeuqkPgvPGFBVvhYmD7277pNhpruFEZSKoK0B70&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=243048&view=rev</a><br> \
>> Log:<br> >> Add documentation for the objc_boxable attribute<br>
>><br>
>> Modified:<br>
>> cfe/trunk/include/clang/Basic/Attr.td<br>
>> cfe/trunk/include/clang/Basic/AttrDocs.td<br>
>><br>
>> Modified: cfe/trunk/include/clang/Basic/Attr.td<br>
>> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_ \
cfe_trunk_include_clang_Basic_Attr.td-3Frev-3D243048-26r1-3D243047-26r2-3D243048-26view-3Ddiff&d=AwMFaQ&c= \
8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=7nuoH3zAY_N4GC40lxhuGOZbQOnYPqYv2fs8-JV0xEw&s=_mhGSu75FRUgzIr3UMiZPRaJ2DyszeiBXt2ga2y3Qac&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=243048&r1=243047&r2=243048&view=diff</a><br>
>> ==============================================================================<br>
>> --- cfe/trunk/include/clang/Basic/Attr.td (original)<br>
>> +++ cfe/trunk/include/clang/Basic/Attr.td Thu Jul 23 16:53:13 2015<br>
>> @@ -1143,7 +1143,7 @@ def ObjCRuntimeName : Attr {<br>
>> def ObjCBoxable : Attr {<br>
>> let Spellings = [GNU<"objc_boxable">];<br>
>> let Subjects = SubjectList<[Record], ErrorDiag, "ExpectedStructOrUnion">;<br>
>> - let Documentation = [Undocumented];<br>
>> + let Documentation = [ObjCBoxableDocs];<br>
>> }<br>
>><br>
>> def OptimizeNone : InheritableAttr {<br>
>><br>
>> Modified: cfe/trunk/include/clang/Basic/AttrDocs.td<br>
>> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_ \
cfe_trunk_include_clang_Basic_AttrDocs.td-3Frev-3D243048-26r1-3D243047-26r2-3D243048-26view-3Ddiff&d=AwMFa \
Q&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=7nuoH3zAY_N4GC40lxhuGOZbQOnYPqYv2fs8-JV0xEw&s=TVDcwlEx2tajawLr4jn0YN0fO7wQZ_AzHZ7NtCmyVks&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttrDocs.td?rev=243048&r1=243047&r2=243048&view=diff</a><br>
>> ==============================================================================<br>
>> --- cfe/trunk/include/clang/Basic/AttrDocs.td (original)<br>
>> +++ cfe/trunk/include/clang/Basic/AttrDocs.td Thu Jul 23 16:53:13 2015<br>
>> @@ -492,6 +492,34 @@ can only be placed before an @protocol o<br>
>> }];<br>
>> }<br>
>><br>
>> +def ObjCBoxableDocs : Documentation {<br>
>> + let Category = DocCatFunction;<br>
>> + let Content = [{<br>
>> +Structs and unions marked with the ``objc_boxable`` attribute can be used<br>
>> +with the Objective-C boxed expression syntax, ``@(...)``.<br>
>> +<br>
>> +**Usage**: ``__attribute__((objc_boxable))``. This attribute<br>
>> +can only be placed on a declaration of a trivially-copyable struct or union:<br>
>> +<br>
>> +.. code-block:: objc<br>
>> +<br>
>> + struct __attribute__((objc_boxable)) some_struct {<br>
>> + int i;<br>
>> + };<br>
>> + union __attribute__((objc_boxable)) some_union {<br>
>> + int i;<br>
>> + float f;<br>
>> + };<br>
>> + typedef struct __attribute__((objc_boxable)) _some_struct some_struct;<br>
>> +<br>
>> + // ...<br>
>> +<br>
>> + some_struct ss;<br>
>> + NSValue *boxed = @(ss);<br>
>> +<br>
>> + }];<br>
>> +}<br>
>> +<br>
>> def AvailabilityDocs : Documentation {<br>
>> let Category = DocCatFunction;<br>
>> let Content = [{<br>
>><br>
>><br>
>> _______________________________________________<br>
>> cfe-commits mailing list<br>
>> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" rel="noreferrer" \
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br> ><br>
<br>
</blockquote></div>
_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic