================
@@ -2133,6 +2142,18 @@ 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()) {
+ // Diagnose any aggregate behavior changes in C++20
+ for (field_iterator I = field_begin(), E = field_end(); I != E; ++I) {
+ if (const auto *attr = I->getAttr<ExplicitAttr>()) {
+ Context.getDiagnostics().Report(
+ getLocation(), diag::warn_cxx20_compat_aggregate_init_with_ctors)
----------------
higher-performance wrote:
Added a new warning, please take another look.
https://github.com/llvm/llvm-project/pull/102040
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits