<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 24, 2014 at 12:14 PM, Saleem Abdulrasool <span dir="ltr"><<a href="mailto:compnerd@compnerd.org" target="_blank">compnerd@compnerd.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: compnerd<br>
Date: Mon Nov 24 14:14:26 2014<br>
New Revision: 222679<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222679&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=222679&view=rev</a><br>
Log:<br>
CodeGen: use a range-based for loop<br>
<br>
Convert a debug assertion into a range-based loop form.  NFC.<br>
<br>
Modified:<br>
    cfe/trunk/lib/CodeGen/CGCall.cpp<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=222679&r1=222678&r2=222679&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=222679&r1=222678&r2=222679&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Mon Nov 24 14:14:26 2014<br>
@@ -447,9 +447,8 @@ CodeGenTypes::arrangeLLVMFunctionInfo(Ca<br>
                                       FunctionType::ExtInfo info,<br>
                                       RequiredArgs required) {<br>
 #ifndef NDEBUG<br>
-  for (ArrayRef<CanQualType>::const_iterator<br>
-         I = argTypes.begin(), E = argTypes.end(); I != E; ++I)<br>
-    assert(I->isCanonicalAsParam());<br>
+  for (const auto &AT : argTypes)<br>
+    assert(AT.isCanonicalAsParam());<br>
 #endif<br></blockquote><div><br>How about:<br><br>  assert(std::all_of(argTypes.begin(), argTypes.end(), std::mem_fun_ref(&CanQualType::isCanonicalAsParam));<br><br>? <br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
   unsigned CC = ClangCallConvToLLVMCallConv(info.getCC());<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>