From ea6668c4e8447a72db00b058f804d90a91ffd92d Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 21 Feb 2014 14:14:04 +0000 Subject: Moving the documentation for the type safety checking attributes into AttrDocs. If a custom heading is provided, do not automatically generate the alternate spelling list. This is necessary because some attributes have distinct semantic spellings and meanings, but use the same semantic attribute internally. Such attributes should have multiple elements in their documentation list, but not show all spellings. At some point, it would be nice to have a way to attach the documentation element to a specific spelling for these cases. llvm-svn: 201851 --- clang/utils/TableGen/ClangAttrEmitter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/utils') diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index 8f65d910858..3b4955755e1 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -2693,6 +2693,7 @@ static void WriteDocumentation(const DocumentationData &Doc, // Determine the heading to be used for this attribute. std::string Heading = Doc.Documentation->getValueAsString("Heading"); + bool CustomHeading = !Heading.empty(); if (Heading.empty()) { // If there's only one spelling, we can simply use that. if (Spellings.size() == 1) @@ -2745,7 +2746,7 @@ static void WriteDocumentation(const DocumentationData &Doc, // Print out the heading for the attribute. If there are alternate spellings, // then display those after the heading. - if (!Names.empty()) { + if (!CustomHeading && !Names.empty()) { Heading += " ("; for (std::vector::const_iterator I = Names.begin(), E = Names.end(); I != E; ++I) { -- cgit v1.2.3