<div dir="ltr">+  TypoCorrection &getNextCorrection();<br><div class="gmail_extra"><div class="gmail_extra">+</div><div class="gmail_extra">+  /// \brief Get the last correction returned by getNextCorrection().</div><div class="gmail_extra">
+  TypoCorrection &getCurrentCorrection() {</div><div class="gmail_extra"></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Since the TypoCorrections are now intended to be reused, it would seem wise to return them either by value or by const reference.<br>
<br><div class="gmail_quote">On Mon, Jul 14, 2014 at 4:55 PM, Kaelyn Takata <span dir="ltr"><<a href="mailto:rikka@google.com" target="_blank">rikka@google.com</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">
<br>
Two additional methods are provided: one to return the current<br>
correction (the last correction returned by getNextCorrection), and one<br>
to "reset" the state so that getNextCorrection will return the previous<br>
corrections before returning any new corrections.<br>
<br>
Also ensure that all TypoCorrections have valid source ranges.<br>
---<br>
 include/clang/Sema/SemaInternal.h   | 31 ++++++++++++++++++++++++++-----<br>
 include/clang/Sema/TypoCorrection.h |  2 +-<br>
 lib/Sema/SemaLookup.cpp             | 16 ++++++++++++----<br>
 3 files changed, 39 insertions(+), 10 deletions(-)<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>
<br></blockquote></div><br></div></div>