================
@@ -653,15 +697,35 @@ static std::vector<std::unique_ptr<TagNode>>
 genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) {
   std::vector<std::unique_ptr<TagNode>> Out;
   std::string EnumType = I.Scoped ? "enum class " : "enum ";
+  // Determine if enum members have comments attached
+  bool HasComments = false;
+  for (const auto &M : I.Members) {
+    if (!M.Description.empty()) {
+      HasComments = true;
+      break;
+    }
+  }
----------------
ilovepi wrote:

```suggestion
  bool HasComments = std::any_of(I.Members.begin(), I.Members.end(), [](auto 
M){return M.Description.empty();});
```
Maybe something like this instead? I didn't check the syntax, so take w/ a 
grain of salt.

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

Reply via email to