diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 2ced44d965e3..d012710bfe6b 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -447,9 +447,8 @@ CodeGenTypes::arrangeLLVMFunctionInfo(CanQualType resultType, FunctionType::ExtInfo info, RequiredArgs required) { #ifndef NDEBUG - for (ArrayRef::const_iterator - I = argTypes.begin(), E = argTypes.end(); I != E; ++I) - assert(I->isCanonicalAsParam()); + for (const auto &AT : argTypes) + assert(AT.isCanonicalAsParam()); #endif unsigned CC = ClangCallConvToLLVMCallConv(info.getCC());