[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 13 11:35:20 PDT 2024
================
@@ -2148,6 +2158,19 @@ void CXXRecordDecl::completeDefinition(CXXFinalOverriderMap *FinalOverriders) {
for (conversion_iterator I = conversion_begin(), E = conversion_end();
I != E; ++I)
I.setAccess((*I)->getAccess());
+
+ ASTContext &Context = getASTContext();
+ if (!Context.getLangOpts().CPlusPlus20 && hasUserDeclaredConstructor()) {
----------------
higher-performance wrote:
Done.
https://github.com/llvm/llvm-project/pull/102040
More information about the cfe-commits
mailing list