[clang-tools-extra] [clangd] Show alignment for records and fields decls (PR #67213)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 21 08:16:31 PDT 2023


================
@@ -1488,6 +1491,8 @@ markup::Document HoverInfo::present() const {
           llvm::formatv(" (+{0} padding)", formatSize(*Padding)).str());
     }
   }
+  if (Align)
+    Output.addParagraph().appendText("Align: " + formatSize(*Align));
----------------
Endilll wrote:

My preference would be to have alignment on the same line as size, so that less vertical space is wasted. The following hover should illustrate why this might be more important than it appears on other hovers posted in this PR: 
![image](https://github.com/llvm/llvm-project/assets/12883766/426a6770-3675-46eb-9f33-0d01429f7aa8)

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


More information about the cfe-commits mailing list