[clang-tools-extra] [clang-tidy][NFC] Enable readability-any-all-of check (PR #167134)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 10 07:16:07 PST 2025
================
@@ -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
More information about the cfe-commits
mailing list