[PATCH v4 2/8] Add the initial TypoExpr AST node for delayed typo correction.

David Blaikie dblaikie at gmail.com
Fri Sep 5 14:22:49 PDT 2014


Looks mostly reasonable.

The changes to include/clang/Sema/SemaInternal.h seem unrelated to this
patch, though - perhaps they're meant for some other patch? The
TypoDiagnosticGenerator too, is an isolated/unrelated change.

It might be worth adding a test case for statement printing
(StmtPrinter.cpp) with typos - if you can cause the TypoExpr to still be
there when you do an AST Dump? (perhaps on invalid code? Or do you always
transform the TypoExpr into /something/ else, even if you can't suggest a
specific function to call?)

I'm assuming all the other changes are just necessary bits & Pieces to
adding a new expr type? (eg: if I removed some of them, things would
break/fail to compile/etc)



On Tue, Aug 26, 2014 at 11:04 AM, Kaelyn Takata <rikka at google.com> wrote:

> +dblaikie
>
>
> On Thu, Jul 31, 2014 at 1:20 PM, Kaelyn Takata <rikka at google.com> wrote:
>
>> ---
>>  include/clang/AST/DataRecursiveASTVisitor.h |  1 +
>>  include/clang/AST/Expr.h                    | 18 ++++++++++++++++++
>>  include/clang/AST/RecursiveASTVisitor.h     |  1 +
>>  include/clang/Basic/StmtNodes.td            |  1 +
>>  include/clang/Sema/SemaInternal.h           |  3 +++
>>  include/clang/Sema/TypoCorrection.h         |  5 +++++
>>  lib/AST/Expr.cpp                            |  1 +
>>  lib/AST/ExprClassification.cpp              |  3 ++-
>>  lib/AST/ExprConstant.cpp                    |  1 +
>>  lib/AST/ItaniumMangle.cpp                   |  1 +
>>  lib/AST/StmtPrinter.cpp                     |  5 +++++
>>  lib/AST/StmtProfile.cpp                     |  4 ++++
>>  lib/Sema/SemaExceptionSpec.cpp              |  1 +
>>  lib/Sema/TreeTransform.h                    |  6 ++++++
>>  lib/Serialization/ASTReaderStmt.cpp         |  4 ++++
>>  lib/Serialization/ASTWriterStmt.cpp         |  6 ++++++
>>  lib/StaticAnalyzer/Core/ExprEngine.cpp      |  1 +
>>  tools/libclang/CXCursor.cpp                 |  1 +
>>  18 files changed, 62 insertions(+), 1 deletion(-)
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140905/811abc70/attachment.html>


More information about the cfe-commits mailing list