[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 22 13:20:30 PDT 2025
================
@@ -490,15 +490,17 @@ genReferencesBlock(const std::vector<Reference> &References,
}
return Out;
}
-
static std::unique_ptr<TagNode>
-writeFileDefinition(const Location &L,
- std::optional<StringRef> RepositoryUrl = std::nullopt) {
- if (!L.IsFileInRootDir && !RepositoryUrl)
+writeFileDefinition(const ClangDocContext &CDCtx, const Location &L) {
+ std::string RepositoryUrl = CDCtx.RepositoryUrl.value_or("");
+ std::string RepositoryLinePrefix = CDCtx.RepositoryLinePrefix.value_or("");
----------------
ilovepi wrote:
why do this at all? you're just checking if its empty over if its a valid optional. that doesn't seem like an improvement.
https://github.com/llvm/llvm-project/pull/131280
More information about the cfe-commits
mailing list