================
@@ -70,12 +68,11 @@ bool recordIsTriviallyDefaultConstructible(const RecordDecl
&RecordDecl,
return false;
}
// If all its direct bases are trivially constructible.
- for (const CXXBaseSpecifier &Base : ClassDecl->bases()) {
- if (!isTriviallyDefaultConstructible(Base.getType(), Context))
- return false;
- if (Base.isVirtual())
- return false;
- }
+ if (!llvm::all_of(ClassDecl->bases(), [&](const CXXBaseSpecifier &Base) {
+ return isTriviallyDefaultConstructible(Base.getType(), Context) &&
+ !Base.isVirtual();
+ }))
+ return false;
return true;
----------------
zwuis wrote:
Ditto.
```cpp
return llvm::all_of(...);
```
https://github.com/llvm/llvm-project/pull/167134
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits