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

Mohamed Emad via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 18 22:40:05 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)
----------------
hulxv wrote:

> #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?


yup, it's correct but I think we need to add some tests for single files also

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


More information about the cfe-commits mailing list