[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:45:01 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:

That would work, but I'd prefer `Size 24 bytes, alignment 8 bytes` wording. I don't think alignment as a property of type is secondary to size to put it in parentheses.

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


More information about the cfe-commits mailing list