[clang-tools-extra] [clang-doc] Add a breadcrumb navigation bar (PR #173297)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 5 13:05:03 PST 2026
================
@@ -709,6 +770,32 @@ static Error serializeIndex(const ClangDocContext &CDCtx, StringRef RootDir) {
return Error::success();
}
+static void serializeContexts(Info *I,
+ StringMap<std::unique_ptr<Info>> &Infos) {
+ if (I->USR == GlobalNamespaceID)
+ return;
+ auto ParentUSR = I->ParentUSR;
+
+ while (true) {
+ Info *ParentInfo =
+ Infos.at(llvm::toStringRef(llvm::toHex(ParentUSR)).str()).get();
+
+ if (ParentInfo->USR == GlobalNamespaceID) {
----------------
ilovepi wrote:
```suggestion
if (ParentInfo && ParentInfo->USR == GlobalNamespaceID) {
```
AFAIK that could be `nullptr`...
https://github.com/llvm/llvm-project/pull/173297
More information about the cfe-commits
mailing list