================
@@ -632,6 +633,19 @@ static std::unique_ptr<HTMLNode> genHTML(const CommentInfo 
&I) {
     return std::move(ParagraphComment);
   }
 
+  if (I.Kind == "BlockCommandComment") {
+    auto BlockComment = std::make_unique<TagNode>(HTMLTag::TAG_DIV);
+    auto Command = std::make_unique<TagNode>(HTMLTag::TAG_DIV, I.Name);
+    BlockComment->Children.emplace_back(std::move(Command));
+    for (const auto &Child : I.Children) {
+      std::unique_ptr<HTMLNode> Node = genHTML(*Child);
+      if (Node)
+        BlockComment->Children.emplace_back(std::move(Node));
+    }
+    if (BlockComment->Children.empty())
+      return nullptr;
+    return std::move(BlockComment);
----------------
ilovepi wrote:

Do these need to be returned via std::move? Iirc the compiler should do the 
right thing with return values…

The pattern exists elsewhere in this file, it’s not required to change now, but 
we may want to consider up’s this code to use a more idiomatic style. 

https://github.com/llvm/llvm-project/pull/101108
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to