[clang-tools-extra] [clang-doc][fix] crashes when generating HTML without `--repository` (PR #131698)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 18 13:07:50 PDT 2025


================
@@ -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:

https://github.com/llvm/llvm-project/pull/131894 adds more complete testing logic around the `--repository` flag. see if the behavior you're trying to fix reproduces in the tests w/ that PR?

https://github.com/llvm/llvm-project/pull/131698


More information about the cfe-commits mailing list