summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-02-21 14:14:04 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-02-21 14:14:04 +0000
commit953d47e3528313b213b8e0c7701b671e3f491353 (patch)
tree637a86c7a1752aeeec6f5f4330e3a535af9dcef7 /utils
parentb2bb16b671f291a826da17cbec295cd5752444b4 (diff)
downloadclang-953d47e3528313b213b8e0c7701b671e3f491353.tar.gz
clang-953d47e3528313b213b8e0c7701b671e3f491353.tar.bz2
clang-953d47e3528313b213b8e0c7701b671e3f491353.tar.xz
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201851 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/ClangAttrEmitter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp
index 8f65d91085..3b4955755e 100644
--- a/utils/TableGen/ClangAttrEmitter.cpp
+++ b/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<std::string>::const_iterator I = Names.begin(),
E = Names.end(); I != E; ++I) {