[clang] [clang][NFC] Store record layout base offsets in SortedVectorMaps (PR #246392)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 26 06:48:01 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- clang/include/clang/AST/RecordLayout.h clang/lib/AST/RecordLayout.cpp clang/lib/AST/RecordLayoutBuilder.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/AST/RecordLayout.h b/clang/include/clang/AST/RecordLayout.h
index 99549c1f4..eb5305e51 100644
--- a/clang/include/clang/AST/RecordLayout.h
+++ b/clang/include/clang/AST/RecordLayout.h
@@ -169,21 +169,18 @@ private:
using BaseOffsetsMapTy = CXXRecordLayoutInfo::BaseOffsetsMapTy;
// Constructor for C++ records.
- ASTRecordLayout(const ASTContext &Ctx, CharUnits size, CharUnits alignment,
- CharUnits preferredAlignment, CharUnits unadjustedAlignment,
- CharUnits requiredAlignment,
- CharUnits pragmaPackResistantAlignment, bool hasOwnVFPtr,
- bool hasExtendableVFPtr, CharUnits vbptroffset,
- CharUnits datasize, ArrayRef<uint64_t> fieldoffsets,
- CharUnits nonvirtualsize, CharUnits nonvirtualalignment,
- CharUnits preferrednvalignment,
- CharUnits nonrequirednvalignment,
- CharUnits SizeOfLargestEmptySubobject,
- const CXXRecordDecl *PrimaryBase, bool IsPrimaryBaseVirtual,
- const CXXRecordDecl *BaseSharingVBPtr,
- bool EndsWithZeroSizedObject, bool LeadsWithZeroSizedBase,
- BaseOffsetsMapTy &&BaseOffsets,
- VBaseOffsetsMapTy &&VBaseOffsets);
+ ASTRecordLayout(
+ const ASTContext &Ctx, CharUnits size, CharUnits alignment,
+ CharUnits preferredAlignment, CharUnits unadjustedAlignment,
+ CharUnits requiredAlignment, CharUnits pragmaPackResistantAlignment,
+ bool hasOwnVFPtr, bool hasExtendableVFPtr, CharUnits vbptroffset,
+ CharUnits datasize, ArrayRef<uint64_t> fieldoffsets,
+ CharUnits nonvirtualsize, CharUnits nonvirtualalignment,
+ CharUnits preferrednvalignment, CharUnits nonrequirednvalignment,
+ CharUnits SizeOfLargestEmptySubobject, const CXXRecordDecl *PrimaryBase,
+ bool IsPrimaryBaseVirtual, const CXXRecordDecl *BaseSharingVBPtr,
+ bool EndsWithZeroSizedObject, bool LeadsWithZeroSizedBase,
+ BaseOffsetsMapTy &&BaseOffsets, VBaseOffsetsMapTy &&VBaseOffsets);
~ASTRecordLayout() = default;
``````````
</details>
https://github.com/llvm/llvm-project/pull/246392
More information about the cfe-commits
mailing list