<div dir="ltr">I believe the function_ref could also be changed to std::function now that it is allowed in LLVM, unless I'm overlooking something?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 31, 2014 at 11:15 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Looks like the standard idiom is to pass function_ref by value, rather than rvalue reference.<br><br>factoring out CorrectDelayedTyposInExpr is the sort of thing you can commit without pre-commit review (it's not a step backwards in readability, etc, for the existing code even if it's never reused for more callers - so it doesn't need to wait for the extra use-cases to justify it) & possibly leave off the filtering until /that's/ needed.<br><br>(the lifetime semantics of that function_ref will be a bit tricky if a TransformTypos is ever created as a named variable)<br><br><br><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Oct 29, 2014 at 12:49 PM, Kaelyn Takata <span dir="ltr"><<a href="mailto:rikka@google.com" target="_blank">rikka@google.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br>
One takes an Expr* and the other is a simple wrapper that takes an<br>
ExprResult instead, and handles checking whether the ExprResult is<br>
invalid.<br>
<br>
Additionally, allow an optional callback that is run on the full result<br>
of the tree transform, for filtering potential corrections based on the<br>
characteristics of the resulting expression once all of the typos have<br>
been replaced.<br>
---<br>
 include/clang/Sema/Sema.h | 13 +++++++++++++<br>
 lib/Sema/SemaExprCXX.cpp  | 44 ++++++++++++++++++++++++++++----------------<br>
 2 files changed, 41 insertions(+), 16 deletions(-)<br>
<br>
<br></div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">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>
</blockquote></div><br></div>