<div class="gmail_quote">On Thu, Jan 12, 2012 at 5:47 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On Thu, Jan 12, 2012 at 5:32 PM, Kaelyn Uhrain <span dir="ltr"><<a href="mailto:rikka@google.com" target="_blank">rikka@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Author: rikka<br>
Date: Thu Jan 12 19:32:50 2012<br>
New Revision: 148085<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=148085&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=148085&view=rev</a><br>
Log:<br>
Fix up the calls to CorrectTypo in Sema*ObjC.cpp to use callback<br>
objects, and add a basic CorrectionCandidateCallback template class<br>
to simplify the fixups.<br></blockquote><div><br></div></div><div>I'm a bit to sad about the lack of tests. I don't know ObjC very well either, but I think we should look at the objc typo correction tests and at least try to build some...</div>
</div></blockquote><div><br></div><div>The tests that would show a difference are specific enough that I doubt I could cobble them together from other objc typo correction tests--I don't have the slightest clue about the objc-specific syntax and am fuzzy enough about the terminology such as interface versus property to have no idea how to assemble false positives for CorrectTypo to return that the code which called CorrectTypo would then reject.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote">
<div><br></div><div>One minor comment on the patch:</div><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Modified: cfe/trunk/include/clang/Sema/TypoCorrection.h<br>


URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/TypoCorrection.h?rev=148085&r1=148084&r2=148085&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/TypoCorrection.h?rev=148085&r1=148084&r2=148085&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/include/clang/Sema/TypoCorrection.h (original)<br>
+++ cfe/trunk/include/clang/Sema/TypoCorrection.h Thu Jan 12 19:32:50 2012<br>
@@ -110,6 +110,12 @@<br>
         CorrectionDecls.front() == 0;<br>
   }<br>
<br>
+  // Check if this TypoCorrection is the given keyword.<br>
+  template<std::size_t StrLen><br>
+  bool isKeyword(const char (&Str)[StrLen]) const {<br></blockquote><div><br></div></div><div>Please just accept a StringRef here.</div></div>
</blockquote></div><br><div>I don't think that would work since the parameters are duplicated from IdentifierInfo::isStr--and unless I'm totally misinterpreting the parameters, I'm pretty certain that isStr only accepts a fixed-size character array whose length is known at compile-time.</div>
<div><br></div><div>- Kaelyn</div>