[cfe-commits] PATCH: Add typo correction for the (non-template) type name in C++ "new" statements. (issue 5014044)

Kaelyn Uhrain rikka at google.com
Thu Sep 22 15:01:08 PDT 2011


Ping? I'd like at least a little feedback before submitting this patch since
it is the first time I've done anything with the parser code.

On Tue, Sep 13, 2011 at 5:22 PM, Kaelyn Uhrain <rikka at google.com> wrote:

> FYI, this patch allows for typo correction in what is from a user
> perspective a reasonable case where clang should suggest a correction but
> does not. Right now in:
>
> namespace test {
>  class FizBinHelper {};
> }
>
> void foo() {
>  test::FizBinHelper *x;
>  x = new test::FizbinHelper;
> }
>
> clang will just say "expected a type" instead of suggesting correcting
> test::FizbinHelper to test::FizBinHelper (fixing a simple case-mismatch
> typo).
>
> Just in case it wasn't clear what the context of the change is from the
> changes to the test cases. ;)
>
> Cheers,
> Kaelyn
>
>
> On Tue, Sep 13, 2011 at 5:16 PM, <rikka at google.com> wrote:
>
>> Reviewers: cfe-commits_cs.uiuc.edu,
>>
>>
>>
>> Please review this at http://codereview.appspot.com/**5014044/<http://codereview.appspot.com/5014044/>
>>
>> Affected files:
>>  M include/clang/Parse/Parser.h
>>  M include/clang/Sema/Sema.h
>>  M lib/Parse/ParseDecl.cpp
>>  M lib/Parse/ParseExprCXX.cpp
>>  M lib/Parse/Parser.cpp
>>  M lib/Sema/SemaDecl.cpp
>>  M test/SemaCXX/missing-**namespace-qualifier-typo-**corrections.cpp
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110922/2ffb19b5/attachment.html>


More information about the cfe-commits mailing list