================
@@ -494,7 +494,7 @@ 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)
----------------
ilovepi wrote:

> The whole next logic depends on `RepositoryUrl`. how can we continue using it 
> if it's not passed?

What I mean is that often `!L.IsFileInRootDir || !RepositoryUrl` is true when 
we want to use the `--repository` flag, meaning we never use the URL in 
situations where we should.

>If RepositoryUrl is not passed, shouldn't we use file:// protocol as I think? 
>In this case, the FileUrl should be something like file:///path/to/file, not 
>just an empty string

Maybe. I think we're still generating a valid path in the HTML, but different 
generation methods are welcome. Some of this may be obsoleted after @PeterChou1 
finishes landing https://github.com/llvm/llvm-project/pull/108653 and the 
prerequisite Mustache support in LLVM support.


https://github.com/llvm/llvm-project/pull/131698
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to