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

via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 23 03:41:14 PDT 2023


================
@@ -1001,6 +1001,8 @@ void addLayoutInfo(const NamedDecl &ND, HoverInfo &HI) {
   if (auto *RD = llvm::dyn_cast<RecordDecl>(&ND)) {
     if (auto Size = Ctx.getTypeSizeInCharsIfKnown(RD->getTypeForDecl()))
       HI.Size = Size->getQuantity() * 8;
+    if (!RD->isInvalidDecl() && !RD->isDependentType())
----------------
sr-tream wrote:

Yes, I removed this extra check in force-push

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


More information about the cfe-commits mailing list