[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 10:19:24 PDT 2024
================
@@ -81,6 +82,7 @@ CXXRecordDecl::DefinitionData::DefinitionData(CXXRecordDecl *D)
HasPrivateFields(false), HasProtectedFields(false),
HasPublicFields(false), HasMutableFields(false), HasVariantMembers(false),
HasOnlyCMembers(true), HasInitMethod(false), HasInClassInitializer(false),
+ HasUninitializedExplicitInitFields(false),
----------------
erichkeane wrote:
THIS I think makes sense as the alternative cost is too high, despite having a cost on every `CXXRecordDecl`.
That said, should this be on `RecordDecl` instead?
https://github.com/llvm/llvm-project/pull/102040
More information about the cfe-commits
mailing list