[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, &quot;John McCall&quot; &lt;<a \
href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>&gt; wrote:<br \
type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">&gt; On Jul 23, 2015, at 10:01 PM, \
AlexDenisov &lt;<a href="mailto:1101.debian@gmail.com">1101.debian@gmail.com</a>&gt; \
wrote:<br> &gt; Added a bit more documentation for objc_boxable.<br>
&gt; 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>
&gt;<br>
&gt;&gt; On 23 Jul 2015, at 23:53, Alex Denisov &lt;<a \
href="mailto:1101.debian@gmail.com">1101.debian@gmail.com</a>&gt; wrote:<br> \
&gt;&gt;<br> &gt;&gt; Author: alexdenisov<br>
&gt;&gt; Date: Thu Jul 23 16:53:13 2015<br>
&gt;&gt; New Revision: 243048<br>
&gt;&gt;<br>
&gt;&gt; URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_vi \
ewvc_llvm-2Dproject-3Frev-3D243048-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BS \
qEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=7nuoH3zAY_N4GC40lxhuGOZbQOnYPqYv2fs8-JV0xEw&s=ckCyTeuqkPgvPGFBVvhYmD7277pNhpruFEZSKoK0B70&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=243048&amp;view=rev</a><br>
 &gt;&gt; Log:<br>
&gt;&gt; Add documentation for the objc_boxable attribute<br>
&gt;&gt;<br>
&gt;&gt; Modified:<br>
&gt;&gt;     cfe/trunk/include/clang/Basic/Attr.td<br>
&gt;&gt;     cfe/trunk/include/clang/Basic/AttrDocs.td<br>
&gt;&gt;<br>
&gt;&gt; Modified: cfe/trunk/include/clang/Basic/Attr.td<br>
&gt;&gt; URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_vi \
ewvc_llvm-2Dproject_cfe_trunk_include_clang_Basic_Attr.td-3Frev-3D243048-26r1-3D243047 \
-26r2-3D243048-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ7 \
0KdZISM_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&amp;r1=243047&amp;r2=243048&amp;view=diff</a><br> \
&gt;&gt; ==============================================================================<br>
 &gt;&gt; --- cfe/trunk/include/clang/Basic/Attr.td (original)<br>
&gt;&gt; +++ cfe/trunk/include/clang/Basic/Attr.td Thu Jul 23 16:53:13 2015<br>
&gt;&gt; @@ -1143,7 +1143,7 @@ def ObjCRuntimeName : Attr {<br>
&gt;&gt; def ObjCBoxable : Attr {<br>
&gt;&gt;   let Spellings = [GNU&lt;&quot;objc_boxable&quot;&gt;];<br>
&gt;&gt;   let Subjects = SubjectList&lt;[Record], ErrorDiag, \
&quot;ExpectedStructOrUnion&quot;&gt;;<br> &gt;&gt; -   let Documentation = \
[Undocumented];<br> &gt;&gt; +   let Documentation = [ObjCBoxableDocs];<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; def OptimizeNone : InheritableAttr {<br>
&gt;&gt;<br>
&gt;&gt; Modified: cfe/trunk/include/clang/Basic/AttrDocs.td<br>
&gt;&gt; URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_vi \
ewvc_llvm-2Dproject_cfe_trunk_include_clang_Basic_AttrDocs.td-3Frev-3D243048-26r1-3D24 \
3047-26r2-3D243048-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8Sy \
ngJ70KdZISM_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&amp;r1=243047&amp;r2=243048&amp;view=diff</a><br> \
&gt;&gt; ==============================================================================<br>
 &gt;&gt; --- cfe/trunk/include/clang/Basic/AttrDocs.td (original)<br>
&gt;&gt; +++ cfe/trunk/include/clang/Basic/AttrDocs.td Thu Jul 23 16:53:13 2015<br>
&gt;&gt; @@ -492,6 +492,34 @@ can only be placed before an @protocol o<br>
&gt;&gt;      }];<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; +def ObjCBoxableDocs : Documentation {<br>
&gt;&gt; +      let Category = DocCatFunction;<br>
&gt;&gt; +      let Content = [{<br>
&gt;&gt; +Structs and unions marked with the ``objc_boxable`` attribute can be \
used<br> &gt;&gt; +with the Objective-C boxed expression syntax, ``@(...)``.<br>
&gt;&gt; +<br>
&gt;&gt; +**Usage**: ``__attribute__((objc_boxable))``. This attribute<br>
&gt;&gt; +can only be placed on a declaration of a trivially-copyable struct or \
union:<br> &gt;&gt; +<br>
&gt;&gt; +.. code-block:: objc<br>
&gt;&gt; +<br>
&gt;&gt; +   struct __attribute__((objc_boxable)) some_struct {<br>
&gt;&gt; +      int i;<br>
&gt;&gt; +   };<br>
&gt;&gt; +   union __attribute__((objc_boxable)) some_union {<br>
&gt;&gt; +      int i;<br>
&gt;&gt; +      float f;<br>
&gt;&gt; +   };<br>
&gt;&gt; +   typedef struct __attribute__((objc_boxable)) _some_struct \
some_struct;<br> &gt;&gt; +<br>
&gt;&gt; +   // ...<br>
&gt;&gt; +<br>
&gt;&gt; +   some_struct ss;<br>
&gt;&gt; +   NSValue *boxed = @(ss);<br>
&gt;&gt; +<br>
&gt;&gt; +      }];<br>
&gt;&gt; +}<br>
&gt;&gt; +<br>
&gt;&gt; def AvailabilityDocs : Documentation {<br>
&gt;&gt;   let Category = DocCatFunction;<br>
&gt;&gt;   let Content = [{<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; cfe-commits mailing list<br>
&gt;&gt; <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
&gt;&gt; <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>
 &gt;<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