================ @@ -749,13 +752,8 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { Out.emplace_back(std::move(Table)); - if (I.DefLoc) { - if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); - else - Out.emplace_back( - writeFileDefinition(*I.DefLoc, StringRef{*CDCtx.RepositoryUrl})); - } + if (I.DefLoc) + Out.emplace_back(writeFileDefinition(CDCtx, *I.DefLoc)); ---------------- ilovepi wrote:
I know this is just two lines, but lets put this in a helper, just so the logic is easier to understand. Maybe something like `writeFileDefinitionForInfo()` or `createFileDefinition()`? Another name would be fine too. https://github.com/llvm/llvm-project/pull/131280 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits