[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 11:57:04 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:
This logic isn't correct, and happens to prevent us from effectively using the `--repository=` string anywhere, as evidenced by our tests.
I have some additional test changes that I'm in the process of adding that will hopefully cover this case.
An alternative would be to change the deref of the option to use `.value_or("")` instead.
https://github.com/llvm/llvm-project/pull/131698
More information about the cfe-commits
mailing list