From 40ef4274600316ed12a26a73265cf34432e1fbf7 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 12 May 2020 10:16:30 +0200 Subject: [PATCH] get rid of the NDEBUG usage in RecoveryExpr, NFC. use the llvm::all_of, per dblaikie's suggestion. --- clang/lib/AST/Expr.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 8b32730..858f39f 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -4686,10 +4686,7 @@ RecoveryExpr::RecoveryExpr(ASTContext &Ctx, QualType T, SourceLocation BeginLoc, : Expr(RecoveryExprClass, T, VK_LValue, OK_Ordinary), BeginLoc(BeginLoc), EndLoc(EndLoc), NumExprs(SubExprs.size()) { assert(!T.isNull()); -#ifndef NDEBUG // avoid -Wunused warnings. - for (auto *E : SubExprs) - assert(E != nullptr); -#endif + assert(llvm::all_of(SubExprs, [](Expr* E) { return E != nullptr; })); llvm::copy(SubExprs, getTrailingObjects()); setDependence(computeDependence(this)); -- 2.7.4