<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 19, 2014 at 12:56 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: aaronballman<br>
Date: Wed Feb 19 14:56:51 2014<br>
New Revision: 201715<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=201715&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=201715&view=rev</a><br>
Log:<br>
Moving the documentation for the clang::fallthrough attribute into AttrDocs.<br>
<br>
Modified:<br>
    cfe/trunk/docs/LanguageExtensions.rst<br>
    cfe/trunk/include/clang/Basic/Attr.td<br>
    cfe/trunk/include/clang/Basic/AttrDocs.td<br>
<br>
Modified: cfe/trunk/docs/LanguageExtensions.rst<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LanguageExtensions.rst?rev=201715&r1=201714&r2=201715&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LanguageExtensions.rst?rev=201715&r1=201714&r2=201715&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/docs/LanguageExtensions.rst (original)<br>
+++ cfe/trunk/docs/LanguageExtensions.rst Wed Feb 19 14:56:51 2014<br>
@@ -1570,51 +1570,6 @@ Non-standard C++11 Attributes<br>
 Clang's non-standard C++11 attributes live in the ``clang`` attribute<br>
 namespace.<br>
<br>
-The ``clang::fallthrough`` attribute<br>
-------------------------------------<br>
-<br>
-The ``clang::fallthrough`` attribute is used along with the<br>
-``-Wimplicit-fallthrough`` argument to annotate intentional fall-through<br>
-between switch labels.  It can only be applied to a null statement placed at a<br>
-point of execution between any statement and the next switch label.  It is<br>
-common to mark these places with a specific comment, but this attribute is<br>
-meant to replace comments with a more strict annotation, which can be checked<br>
-by the compiler.  This attribute doesn't change semantics of the code and can<br>
-be used wherever an intended fall-through occurs.  It is designed to mimic<br>
-control-flow statements like ``break;``, so it can be placed in most places<br>
-where ``break;`` can, but only if there are no statements on the execution path<br>
-between it and the next switch label.<br>
-<br>
-Here is an example:<br>
-<br>
-.. code-block:: c++<br>
-<br>
-  // compile with -Wimplicit-fallthrough<br>
-  switch (n) {<br>
-  case 22:<br>
-  case 33:  // no warning: no statements between case labels<br>
-    f();<br>
-  case 44:  // warning: unannotated fall-through<br>
-    g();<br>
-    [[clang::fallthrough]];<br>
-  case 55:  // no warning<br>
-    if (x) {<br>
-      h();<br>
-      break;<br>
-    }<br>
-    else {<br>
-      i();<br>
-      [[clang::fallthrough]];<br>
-    }<br>
-  case 66:  // no warning<br>
-    p();<br>
-    [[clang::fallthrough]]; // warning: fallthrough annotation does not<br>
-                            //          directly precede case label<br>
-    q();<br>
-  case 77:  // warning: unannotated fall-through<br>
-    r();<br>
-  }<br>
-<br>
 ``gnu::`` attributes<br>
 --------------------<br></blockquote><div><br></div><div>This change has left the remaining text here a bit broken: "<span style="color:rgb(51,51,51);font-family:'DejaVu Sans',Arial,Helvetica,sans-serif;font-size:14px;line-height:21px;text-align:justify">Clang also supports GCC’s </span><tt class="" style="background-color:rgb(226,226,226);font-size:1em;color:rgb(51,51,51);text-align:justify"><span class="">gnu</span></tt><span style="color:rgb(51,51,51);font-family:'DejaVu Sans',Arial,Helvetica,sans-serif;font-size:14px;line-height:21px;text-align:justify"> attribute namespace [...]".</span></div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Modified: cfe/trunk/include/clang/Basic/Attr.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=201715&r1=201714&r2=201715&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=201715&r1=201714&r2=201715&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/include/clang/Basic/Attr.td (original)<br>
+++ cfe/trunk/include/clang/Basic/Attr.td Wed Feb 19 14:56:51 2014<br>
@@ -642,7 +642,7 @@ def ExtVectorType : Attr {<br>
 def FallThrough : Attr {<br>
   let Spellings = [CXX11<"clang", "fallthrough">];<br>
 //  let Subjects = [NullStmt];<br>
-  let Documentation = [Undocumented];<br>
+  let Documentation = [FallthroughDocs];<br>
 }<br>
<br>
 def FastCall : InheritableAttr {<br>
<br>
Modified: cfe/trunk/include/clang/Basic/AttrDocs.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttrDocs.td?rev=201715&r1=201714&r2=201715&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttrDocs.td?rev=201715&r1=201714&r2=201715&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/include/clang/Basic/AttrDocs.td (original)<br>
+++ cfe/trunk/include/clang/Basic/AttrDocs.td Wed Feb 19 14:56:51 2014<br>
@@ -410,3 +410,50 @@ When one method overrides another, the o<br>
   @end<br>
   }];<br>
 }<br>
+<br>
+def FallthroughDocs : Documentation {<br>
+  let Category = DocCatStmt;<br>
+  let Content = [{<br>
+The ``clang::fallthrough`` attribute is used along with the<br>
+``-Wimplicit-fallthrough`` argument to annotate intentional fall-through<br>
+between switch labels.  It can only be applied to a null statement placed at a<br>
+point of execution between any statement and the next switch label.  It is<br>
+common to mark these places with a specific comment, but this attribute is<br>
+meant to replace comments with a more strict annotation, which can be checked<br>
+by the compiler.  This attribute doesn't change semantics of the code and can<br>
+be used wherever an intended fall-through occurs.  It is designed to mimic<br>
+control-flow statements like ``break;``, so it can be placed in most places<br>
+where ``break;`` can, but only if there are no statements on the execution path<br>
+between it and the next switch label.<br>
+<br>
+Here is an example:<br>
+<br>
+.. code-block:: c++<br>
+<br>
+  // compile with -Wimplicit-fallthrough<br>
+  switch (n) {<br>
+  case 22:<br>
+  case 33:  // no warning: no statements between case labels<br>
+    f();<br>
+  case 44:  // warning: unannotated fall-through<br>
+    g();<br>
+    [[clang::fallthrough]];<br>
+  case 55:  // no warning<br>
+    if (x) {<br>
+      h();<br>
+      break;<br>
+    }<br>
+    else {<br>
+      i();<br>
+      [[clang::fallthrough]];<br>
+    }<br>
+  case 66:  // no warning<br>
+    p();<br>
+    [[clang::fallthrough]]; // warning: fallthrough annotation does not<br>
+                            //          directly precede case label<br>
+    q();<br>
+  case 77:  // warning: unannotated fall-through<br>
+    r();<br>
+  }<br>
+  }];<br>
+}<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" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>