diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-02-21 14:14:04 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-02-21 14:14:04 +0000 |
| commit | ea6668c4e8447a72db00b058f804d90a91ffd92d (patch) | |
| tree | 795a222da15e50821727e920c9d6574865bf3d5a /clang/utils | |
| parent | 7803b888c4daf4523ba6fa64234aba29cbe36d95 (diff) | |
| download | bcm5719-llvm-ea6668c4e8447a72db00b058f804d90a91ffd92d.tar.gz bcm5719-llvm-ea6668c4e8447a72db00b058f804d90a91ffd92d.zip | |
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
Diffstat (limited to 'clang/utils')
| -rw-r--r-- | clang/utils/TableGen/ClangAttrEmitter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<std::string>::const_iterator I = Names.begin(), E = Names.end(); I != E; ++I) { |

