[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)
Mohamed Emad via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 17 12:50:18 PDT 2025
================
@@ -57,7 +57,12 @@ static void writeFileDefinition(const ClangDocContext &CDCtx, const Location &L,
OS << "*Defined at " << L.Filename << "#" << std::to_string(L.LineNumber)
<< "*";
} else {
- OS << "*Defined at [" << L.Filename << "#" << std::to_string(L.LineNumber)
+ OS << "*Defined at [" << L.Filename << "#";
+
+ if (!CDCtx.RepositoryLinePrefix)
+ OS << StringRef{*CDCtx.RepositoryLinePrefix};
+
+ OS << std::to_string(L.LineNumber)
----------------
hulxv wrote:
What do you think about using `formatv` for the whole of this part as you referred to previously [here](https://github.com/llvm/llvm-project/pull/131280/files#r1996279237)? Is it not more readable?
https://github.com/llvm/llvm-project/pull/131280
More information about the cfe-commits
mailing list