diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-02-17 15:27:10 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-02-17 15:27:10 +0000 |
commit | b0d5955832088e3771d541dda30cc8f73e5d93f2 (patch) | |
tree | 8b04bf5fcf95a17852cc3e003ca3b5e6facf41ba /docs/InternalsManual.rst | |
parent | 7e2fb94d6283456401d5154b9fb3d1c47b889b4a (diff) | |
download | clang-b0d5955832088e3771d541dda30cc8f73e5d93f2.tar.gz |
Implements a declarative approach to documenting individual attributes in Clang via a Documentation tablegen class. Also updates the internals manual with information about how to use this new, required, documentation feature.
This patch adds some very, very sparse initial documentation for some attributes. Additional effort from attribute authors is greatly appreciated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/InternalsManual.rst')
-rw-r--r-- | docs/InternalsManual.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/InternalsManual.rst b/docs/InternalsManual.rst index 96d43ab57d..a34ba29c21 100644 --- a/docs/InternalsManual.rst +++ b/docs/InternalsManual.rst @@ -1727,6 +1727,21 @@ If additional functionality is desired for the semantic form of the attribute, the ``AdditionalMembers`` field specifies code to be copied verbatim into the semantic attribute class object. +All attributes must have one or more form of documentation, which is provided +in the ``Documentation`` list. Generally, the documentation for an attribute +is a stand-alone definition in `include/clang/Basic/AttrDocs.td +<http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttdDocs.td?view=markup>`_ +that is named after the attribute being documented. Each documentation element +is given a ``Category`` (variable, function, or type) and ``Content``. A single +attribute may contain multiple documentation elements for distinct categories. +For instance, an attribute which can appertain to both function and types (such +as a calling convention attribute), should contain two documentation elements. +The ``Content`` for an attribute uses reStructuredText (RST) syntax. + +If an attribute is used internally by the compiler, but is not written by users +(such as attributes with an empty spelling list), it can use the +``Undocumented`` documentation element. + Boilerplate ^^^^^^^^^^^ |