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

Kaelyn Uhrain rikka at google.com
Tue Sep 13 17:22:20 PDT 2011


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/20110913/6268d174/attachment.html>


More information about the cfe-commits mailing list