================
@@ -3941,6 +3945,157 @@ TEST(Hover, DisableShowAKA) {
   EXPECT_EQ(H->Type, HoverInfo::PrintedType("m_int"));
 }
 
+TEST(Hover, ShowFields) {
+  struct {
+    const char *const Code;
+    const std::function<void(HoverInfo &)> ExpectedBuilder;
+  } Cases[] = {
+    {
+      R"cpp(// Struct
+        namespace ns1 {
+          struct MyClass {
+            // Public fields shown in hover
+            int field1;
+            int field2;
+
+            // Methods and private fields not shown
+            void method();
----------------
tom-anders wrote:

would it make sense to add an additional option that also shows public methods? 
(probably out-of-scope for this PR though)

https://github.com/llvm/llvm-project/pull/89557
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to