[cfe-commits] r148085 - in /cfe/trunk: include/clang/Sema/TypoCorrection.h lib/Sema/SemaDeclObjC.cpp lib/Sema/SemaExprObjC.cpp

Chandler Carruth chandlerc at google.com
Thu Jan 12 17:47:32 PST 2012


On Thu, Jan 12, 2012 at 5:32 PM, Kaelyn Uhrain <rikka at google.com> wrote:

> Author: rikka
> Date: Thu Jan 12 19:32:50 2012
> New Revision: 148085
>
> URL: http://llvm.org/viewvc/llvm-project?rev=148085&view=rev
> Log:
> Fix up the calls to CorrectTypo in Sema*ObjC.cpp to use callback
> objects, and add a basic CorrectionCandidateCallback template class
> to simplify the fixups.
>

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...

One minor comment on the patch:

Modified: cfe/trunk/include/clang/Sema/TypoCorrection.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/TypoCorrection.h?rev=148085&r1=148084&r2=148085&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Sema/TypoCorrection.h (original)
> +++ cfe/trunk/include/clang/Sema/TypoCorrection.h Thu Jan 12 19:32:50 2012
> @@ -110,6 +110,12 @@
>         CorrectionDecls.front() == 0;
>   }
>
> +  // Check if this TypoCorrection is the given keyword.
> +  template<std::size_t StrLen>
> +  bool isKeyword(const char (&Str)[StrLen]) const {
>

Please just accept a StringRef here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120112/ad4a59a2/attachment.html>


More information about the cfe-commits mailing list