Skip to content

Commit 50ab553

Browse files
committed
fix tidy warnings
1 parent 5c78e2a commit 50ab553

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

clang-tools-extra/clang-tidy/modernize/UseConstexprCheck.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,11 @@ static bool satisfiesProperties11(
222222

223223
bool WalkUpFromNullStmt(NullStmt *) { return false; }
224224
bool WalkUpFromDeclStmt(DeclStmt *DS) {
225-
for (const Decl *D : DS->decls())
226-
if (!llvm::isa<StaticAssertDecl, TypedefNameDecl, UsingDecl,
227-
UsingDirectiveDecl>(D)) {
228-
Possible = false;
229-
return false;
230-
}
231-
return true;
225+
Possible &= llvm::all_of(DS->decls(), [](const Decl *D) {
226+
return llvm::isa<StaticAssertDecl, TypedefNameDecl, UsingDecl,
227+
UsingDirectiveDecl>(D);
228+
});
229+
return Possible;
232230
}
233231

234232
bool WalkUpFromExpr(Expr *) { return true; }
@@ -347,7 +345,7 @@ AST_MATCHER_P2(FunctionDecl, satisfiesProperties, bool, ConservativeLiteralType,
347345

348346
AST_MATCHER_P(VarDecl, satisfiesVariableProperties, bool,
349347
ConservativeLiteralType) {
350-
ASTContext &Ctx = Finder->getASTContext();
348+
const ASTContext &Ctx = Finder->getASTContext();
351349

352350
const QualType QT = Node.getType();
353351
const Type *T = QT.getTypePtr();

0 commit comments

Comments
 (0)