From: Aaron Ballman Date: Wed, 19 Feb 2014 20:55:42 +0000 (+0000) Subject: Added a documentation category for statement attributes so that things like clang... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebb8fd622282619ea802025cb424ecfc0d788871;p=clang Added a documentation category for statement attributes so that things like clang::fallthrough can be documented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201714 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index cd8d8a9bdf..673b480604 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -15,6 +15,7 @@ class DocumentationCategory { 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. diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index 39d815eae7..4c94e208a6 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -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