[llvm-branch-commits] [clang-tools-extra] [clang-doc] Make `--repository` change the HTML output (PR #122566)
Petr Hosek via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 5 23:25:50 PST 2025
================
@@ -494,18 +494,31 @@ genReferencesBlock(const std::vector<Reference> &References,
static std::unique_ptr<TagNode>
writeFileDefinition(const Location &L,
std::optional<StringRef> RepositoryUrl = std::nullopt) {
- if (!L.IsFileInRootDir || !RepositoryUrl)
+ if (!L.IsFileInRootDir && !RepositoryUrl)
return std::make_unique<TagNode>(
HTMLTag::TAG_P, "Defined at line " + std::to_string(L.LineNumber) +
" of file " + L.Filename);
SmallString<128> FileURL(*RepositoryUrl);
- llvm::sys::path::append(FileURL, llvm::sys::path::Style::posix, L.Filename);
+ llvm::sys::path::append(
+ FileURL, llvm::sys::path::Style::posix,
+ // If we're on windows, the file name will be in the wrong format, and
----------------
petrhosek wrote:
```suggestion
// If we're on Windows, the file name will be in the wrong format, and
```
https://github.com/llvm/llvm-project/pull/122566
More information about the llvm-branch-commits
mailing list