summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/CommentToXML.cpp
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2019-12-21 14:47:52 +0100
committerMark de Wever <koraq@xs4all.nl>2019-12-21 14:52:21 +0100
commitbe1a9b3863b6649ef64f25c22394335c47f2ef31 (patch)
tree7361e0687b0b0b6b09712811029c2efde448764f /clang/lib/Index/CommentToXML.cpp
parent2947da9ff7d1a1c1d0356ac51405e6576d8fbf64 (diff)
downloadbcm5719-llvm-be1a9b3863b6649ef64f25c22394335c47f2ef31.tar.gz
bcm5719-llvm-be1a9b3863b6649ef64f25c22394335c47f2ef31.zip
[Wdocumentation] Implement \anchor
Differential revision: https://reviews.llvm.org/D69223
Diffstat (limited to 'clang/lib/Index/CommentToXML.cpp')
-rw-r--r--clang/lib/Index/CommentToXML.cpp8
1 files changed, 8 insertions, 0 deletions
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;
}
}
OpenPOWER on IntegriCloud