From 32d1a96d6971cc3d076f5c2b38dd04bfbd6e369c Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 25 Nov 2014 03:49:50 +0000 Subject: [PATCH] CodeGen: further simplify assertion Use more of algorithm to simplify the assertion. Pointed out by David Blakie! llvm-svn: 222721 --- clang/lib/CodeGen/CGCall.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index d012710..6db753f 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -446,10 +446,8 @@ CodeGenTypes::arrangeLLVMFunctionInfo(CanQualType resultType, ArrayRef argTypes, FunctionType::ExtInfo info, RequiredArgs required) { -#ifndef NDEBUG - for (const auto &AT : argTypes) - assert(AT.isCanonicalAsParam()); -#endif + assert(std::all_of(argTypes.begin(), argTypes.end(), + std::mem_fun_ref(&CanQualType::isCanonicalAsParam))); unsigned CC = ClangCallConvToLLVMCallConv(info.getCC()); -- 2.7.4