[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:       AlexDenisov <1101.debian () gmail ! com>
Date:       2015-07-24 5:01:06
Message-ID: 7281F948-F0D3-4DD9-94E5-0180B9C18E95 () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Added a bit more documentation for objc_boxable.
Could you, please, check it in the release_37?

> 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


["signature.asc" (signature.asc)]

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJVscaSAAoJEKnZX2FYSnX6PVoH/j9EU1oyKhu3f3i8GEBJd3ry
BJbIjRI5T5gku1IuT0FfowYsuAWNoGWz/LYw3f7vu57ZIDa5aiGD7jD2Ke3qpf79
pOajuWAgckZbYGfXUrOk0zs7gz4Z8AAh0FbeStI9LmJ9dXIRI3dePn7bLy1/6Wl0
Yd/bS2BR3Loqs7WTGl+p/EYUBx+NeyoEqh3EqPZ6mOn8geH24HocVrwNuycJvL5R
3x6SOsGJTGhd7QatwpQMojxxZOtp9OgQuFP7+tDq23fSMG8q1VQYAF78RRAYPU9M
MjXVjhHM+ajCYwguyTBduf6rBjvbku5hsIgONMMY8T7oEvUu0GSGcnHWPb9ILws=
=0rh2
-----END PGP SIGNATURE-----


_______________________________________________
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