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

James Cowsert via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 7 09:36:35 PST 2026


================
@@ -1645,6 +1645,50 @@ TEST(Hover, DefinitionLanuage) {
   }
 }
 
+TEST(Hover, AccessSpecifierByLanguage) {
+  struct {
+    const char *const Code;
+    const std::string ClangLanguageFlag;
+    const char *const ExpectedAccessSpecifier;
+  } Cases[] = {
+      {R"cpp(
+        struct Waldo {
+          int [[loca^tion]];
----------------
J-Cowsert wrote:

Good catch.  The DefinitionLanuage (HoverTests.cpp:1615) test I used as boilerplate has the same problem. I'll remove the ranges in my test.

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


More information about the cfe-commits mailing list