[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


================
@@ -697,10 +697,39 @@ static TemplateParamInfo convertTemplateArgToInfo(const clang::Decl *D,
   return TemplateParamInfo(Str);
 }
 
+// Check if the DeclKind is one for which we support contextual relationships.
+// There might be other ContextDecls, like blocks, that we currently don't
+// handle at all.
+static bool isSupportedContext(Decl::Kind DeclKind) {
+  if (DeclKind == Decl::Kind::Record || DeclKind == Decl::Kind::CXXRecord ||
+      DeclKind == Decl::Kind::Namespace ||
+      DeclKind == Decl::Kind::ClassTemplateSpecialization ||
+      DeclKind == Decl::Kind::ClassTemplatePartialSpecialization)
+    return true;
----------------
ilovepi wrote:

Maybe convert to a switch?

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


More information about the cfe-commits mailing list