<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 12, 2012, at 7:05 PM, Sean Silva wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="im">> BTW - patch attached to add pre-increment to llvm::content_iterator (which is the template base for section_iterator, etc)<br>><br>> -- Marshall<br><br><br></div>Index: include/llvm/Object/ObjectFile.h<br>===================================================================<br>--- include/llvm/Object/ObjectFile.h    (revision 158307)<br>+++ include/llvm/Object/ObjectFile.h    (working copy)<br>+  content_iterator& operator++() {<br>+       error_code ec;<br>+       return this->increment (ec);<br>+  }<br><br>This is wrong. It ignores the error. operator ++ should be implemented<br>the same way as ++ is in include/llvm/Support/YAMLParser.h. If<br>iteration fails, turn the iterator into an end iterator and set a<br>failed flag and allow the user to access the error_code.<br></span></blockquote></div><div><br></div>As I said to Michael in private email - this is at least as wrong, since it throws away the position in the sequence where the error occurs.<div><br><div><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">-- Marshall<br><br>Marshall Clow     Idio Software   <<a href="mailto:mclow.lists@gmail.com">mailto:mclow.lists@gmail.com</a>><br><br>A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).<br>        -- Yu Suzuki</span>
</div>
<br></div></div></body></html>