<div dir="ltr">Looks like a bug. This can probably be simplified with C++11.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 4, 2014 at 10:39 AM, Robison, Arch <span dir="ltr"><<a href="mailto:arch.robison@intel.com" target="_blank">arch.robison@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">tools/llvm-objdump/COFFDump.cpp has two loops that advance the loop iterator using "I = ++I" instead of the usual "++I". For example:<br>
<br>
import_directory_iterator I = Obj->import_directory_begin();<br>
import_directory_iterator E = Obj->import_directory_end();<br>
if (I == E)<br>
return;<br>
outs() << "The Import Tables:\n";<br>
for (; I != E; I = ++I) {<br>
...<br>
}<br>
<br>
Is there a reason for writing "I = ++I" instead of "++I" ?<br>
<br>
- Arch D. Robison<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>