[clang-tools-extra] [clangd] Omit C++ access specifiers from C hovers (PR #239877)

Aleksandr Platonov via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 7 03:57:00 PST 2026


================
@@ -666,7 +666,8 @@ HoverInfo getHoverContents(const NamedDecl *D, const PrintingPolicy &PP,
   HoverInfo HI;
   auto &Ctx = D->getASTContext();
 
-  HI.AccessSpecifier = getAccessSpelling(D->getAccess()).str();
+  if (Ctx.getLangOpts().CPlusPlus)
----------------
ArcsinX wrote:

What about ObjectiveC?

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


More information about the cfe-commits mailing list