]> granicus.if.org Git - clang/commitdiff
Added a documentation category for statement attributes so that things like clang...
authorAaron Ballman <aaron@aaronballman.com>
Wed, 19 Feb 2014 20:55:42 +0000 (20:55 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 19 Feb 2014 20:55:42 +0000 (20:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201714 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Attr.td
utils/TableGen/ClangAttrEmitter.cpp

index cd8d8a9bdf359f5ed442b60b324a2509173f0394..673b4806041f333ebd27769463ca3eb9b3a0ae6a 100644 (file)
@@ -15,6 +15,7 @@ class DocumentationCategory<string name> {
 def DocCatFunction : DocumentationCategory<"Functions">;
 def DocCatVariable : DocumentationCategory<"Variables">;
 def DocCatType : DocumentationCategory<"Types">;
+def DocCatStmt : DocumentationCategory<"Statements">;
 // Attributes listed under the Undocumented category do not generate any public
 // documentation. Ideally, this category should be used for internal-only
 // attributes which contain no spellings.
index 39d815eae7f9bdfe249f264888a297a21fa5f461..4c94e208a69beea659f3962b8c7848ce8efca5cd 100644 (file)
@@ -2652,6 +2652,7 @@ public:
     Function,
     Variable,
     Type,
+    Statement,
     Undocumented
   };
 
@@ -2684,6 +2685,10 @@ static void WriteCategoryHeader(DocumentationData::DocCategory Category,
       OS << "Type Attributes\n";
       OS << "===============\n";
       break;
+    case DocumentationData::Statement:
+      OS << "Statement Attributes\n";
+      OS << "====================\n";
+      break;
   }
   OS << "\n";
 }
@@ -2845,6 +2850,7 @@ void EmitClangAttrDocs(RecordKeeper &Records, raw_ostream &OS) {
               .Case("Functions", DocumentationData::Function)
               .Case("Variables", DocumentationData::Variable)
               .Case("Types", DocumentationData::Type)
+              .Case("Statements", DocumentationData::Statement)
               .Case("Undocumented", DocumentationData::Undocumented);
 
       // If the category is "undocumented", then there cannot be any other