diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/CommentSema.cpp | 1 | ||||
-rw-r--r-- | clang/lib/AST/JSONNodeDumper.cpp | 3 | ||||
-rw-r--r-- | clang/lib/AST/TextNodeDumper.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Index/CommentToXML.cpp | 8 |
4 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/AST/CommentSema.cpp b/clang/lib/AST/CommentSema.cpp index dda31e90601..53c1832d1dd 100644 --- a/clang/lib/AST/CommentSema.cpp +++ b/clang/lib/AST/CommentSema.cpp @@ -1143,6 +1143,7 @@ Sema::getInlineCommandRenderKind(StringRef Name) const { .Case("b", InlineCommandComment::RenderBold) .Cases("c", "p", InlineCommandComment::RenderMonospaced) .Cases("a", "e", "em", InlineCommandComment::RenderEmphasized) + .Case("anchor", InlineCommandComment::RenderAnchor) .Default(InlineCommandComment::RenderNormal); } diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp index 40c6c8375a6..c30b07137ed 100644 --- a/clang/lib/AST/JSONNodeDumper.cpp +++ b/clang/lib/AST/JSONNodeDumper.cpp @@ -1518,6 +1518,9 @@ void JSONNodeDumper::visitInlineCommandComment( case comments::InlineCommandComment::RenderMonospaced: JOS.attribute("renderKind", "monospaced"); break; + case comments::InlineCommandComment::RenderAnchor: + JOS.attribute("renderKind", "anchor"); + break; } llvm::json::Array Args; diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp index 561c76a45cb..fa7f4130b76 100644 --- a/clang/lib/AST/TextNodeDumper.cpp +++ b/clang/lib/AST/TextNodeDumper.cpp @@ -489,6 +489,9 @@ void TextNodeDumper::visitInlineCommandComment( case comments::InlineCommandComment::RenderEmphasized: OS << " RenderEmphasized"; break; + case comments::InlineCommandComment::RenderAnchor: + OS << " RenderAnchor"; + break; } for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i) diff --git a/clang/lib/Index/CommentToXML.cpp b/clang/lib/Index/CommentToXML.cpp index 55923d679fe..ce6f9e2b13b 100644 --- a/clang/lib/Index/CommentToXML.cpp +++ b/clang/lib/Index/CommentToXML.cpp @@ -297,6 +297,10 @@ void CommentASTToHTMLConverter::visitInlineCommandComment( appendToResultWithHTMLEscaping(Arg0); Result << "</em>"; return; + case InlineCommandComment::RenderAnchor: + assert(C->getNumArgs() == 1); + Result << "<span id=\"" << Arg0 << "\"></span>"; + return; } } @@ -641,6 +645,10 @@ void CommentASTToXMLConverter::visitInlineCommandComment( appendToResultWithXMLEscaping(Arg0); Result << "</emphasized>"; return; + case InlineCommandComment::RenderAnchor: + assert(C->getNumArgs() == 1); + Result << "<anchor id=\"" << Arg0 << "\"></anchor>"; + return; } } |