================
@@ -670,12 +671,17 @@ static std::unique_ptr<HTMLNode> genHTML(const 
CommentInfo &I) {
       return nullptr;
     return std::move(BlockComment);
   }
-  if (I.Kind == "TextComment") {
-    if (I.Text == "")
+
+  case CommentKind::CK_TextComment: {
+    if (I.Text.empty())
       return nullptr;
     return std::make_unique<TextNode>(I.Text);
   }
-  return nullptr;
+
+  // For now, no handling — fallthrough.
+  default:
----------------
ilovepi wrote:

There's still a default case here. I'm after a compiler error for unhandled 
enum values, so we can't use default. If the other cases should return nullptr, 
that's fine, they can all be here instead.

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

Reply via email to