diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-09-06 18:36:24 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-09-06 18:36:24 +0000 |
| commit | 36c5ade2f4674b544039d78db4c466756cf142b0 (patch) | |
| tree | 3d3ed1e1987dbe6444294b1b4e249814b97b97a5 /include/clang/Basic/AttrDocs.td | |
| parent | 51ece4aae5857052d224ce52277924c74685714e (diff) | |
Notes
Diffstat (limited to 'include/clang/Basic/AttrDocs.td')
| -rw-r--r-- | include/clang/Basic/AttrDocs.td | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/clang/Basic/AttrDocs.td b/include/clang/Basic/AttrDocs.td index e4ca0cb4778e..48660166f6c6 100644 --- a/include/clang/Basic/AttrDocs.td +++ b/include/clang/Basic/AttrDocs.td @@ -492,6 +492,34 @@ can only be placed before an @protocol or @interface declaration: }]; } +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 = [{ |
