r201714 - Added a documentation category for statement attributes so that things like clang::fallthrough can be documented.
Aaron Ballman
aaron at aaronballman.com
Wed Feb 19 12:55:43 PST 2014
Author: aaronballman
Date: Wed Feb 19 14:55:42 2014
New Revision: 201714
URL: http://llvm.org/viewvc/llvm-project?rev=201714&view=rev
Log:
Added a documentation category for statement attributes so that things like clang::fallthrough can be documented.
Modified:
cfe/trunk/include/clang/Basic/Attr.td
cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=201714&r1=201713&r2=201714&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Wed Feb 19 14:55:42 2014
@@ -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.
Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=201714&r1=201713&r2=201714&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Wed Feb 19 14:55:42 2014
@@ -2652,6 +2652,7 @@ public:
Function,
Variable,
Type,
+ Statement,
Undocumented
};
@@ -2684,6 +2685,10 @@ static void WriteCategoryHeader(Document
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 &Rec
.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
More information about the cfe-commits
mailing list