[llvm-branch-commits] [clang-tools-extra] [clang-doc] serialize friends (PR #146165)

Paul Kirth via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jun 27 16:05:37 PDT 2025


================
@@ -947,6 +952,53 @@ emitInfo(const NamespaceDecl *D, const FullComment *FC, Location Loc,
   return {std::move(NSI), makeAndInsertIntoParent<const NamespaceInfo &>(*NSI)};
 }
 
+static void parseFriends(RecordInfo &RI, const CXXRecordDecl *D) {
+  if (D->hasDefinition() && D->hasFriends())
----------------
ilovepi wrote:

I think if you invert the condition you can use early return to avoid a level of nesting. 

https://github.com/llvm/llvm-project/pull/146165


More information about the llvm-branch-commits mailing list